Phase 3: Gitea Integration - Migration 012: app_settings table + gitea_commit_sha on endpoint_versions - SettingsService: encrypted token storage (AES-256-GCM from JWT_SECRET) - GiteaService: full REST API client — repo management, file CRUD, branches, commit history, diff/compare, pull requests, sync all - giteaController + routes: 15 API endpoints for settings, branches, commits, PRs, endpoint info, sync - VersionService hooks: auto-sync to Gitea on publish/draft (non-blocking) - Frontend: Gitea tab in Settings (connection, sync status, branch mgmt), Gitea panel in EndpointEditor (file link, last commit SHA) - docker-compose.gitea.yml: optional companion Gitea container - Cache fix: index.html served with no-cache for instant deploys ESLint Setup - Backend: eslint 8 + @typescript-eslint configured - Frontend: eslint 8 + @typescript-eslint + react-hooks + react-refresh - Fixed 15 lint issues: unused imports, require statements, escapes, Function type, empty catch blocks - Added npm run lint / lint:fix scripts Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
# ============================================
|
|
# KIS API Builder - Optional Gitea Integration
|
|
# ============================================
|
|
# Use alongside the main docker-compose:
|
|
# docker compose -f docker-compose.yml -f docker-compose.gitea.yml up -d
|
|
#
|
|
# For existing Gitea: skip this file, configure via Settings UI
|
|
# ============================================
|
|
|
|
services:
|
|
gitea:
|
|
image: gitea/gitea:1.22-rootless
|
|
container_name: kis-api-builder-gitea
|
|
restart: unless-stopped
|
|
environment:
|
|
- GITEA__database__DB_TYPE=sqlite3
|
|
- GITEA__server__ROOT_URL=${GITEA_URL:-http://localhost:${GITEA_PORT:-8010}}
|
|
- GITEA__server__HTTP_PORT=3000
|
|
- GITEA__security__INSTALL_LOCK=true
|
|
- GITEA__service__DISABLE_REGISTRATION=true
|
|
volumes:
|
|
- gitea_data:/var/lib/gitea
|
|
- gitea_config:/etc/gitea
|
|
ports:
|
|
- "${GITEA_PORT:-8010}:3000"
|
|
networks:
|
|
- kis-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
app:
|
|
environment:
|
|
GITEA_URL: ${GITEA_URL:-http://gitea:3000}
|
|
depends_on:
|
|
gitea:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
gitea_data:
|
|
gitea_config:
|