- Extract schema migrations, KC sync, and seed data to migrate.py; run as Helm init container before pods start - Guard seed data behind SEED_DATA=true env var (off by default) - Add Config.validate_production() — fail loudly if SECRET_KEY, FERNET_KEY, or DATABASE_URL are missing/insecure in production - Add /api/auth/ready endpoint with SELECT 1 DB check for readiness probe - Make CORS origins configurable via CORS_ORIGINS env var - Fix duplicate downtime reminders with SELECT FOR UPDATE SKIP LOCKED - Add --access-logfile and --graceful-timeout to gunicorn - Add SSL_CERT_FILE env var in Helm for Authlib/httpx CA cert support - Slim run.py to app creation + background workers only Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: mgmt-backend
|
|
ports:
|
|
- "5001:5001"
|
|
volumes:
|
|
- ./backend:/app
|
|
environment:
|
|
- FLASK_ENV=development
|
|
- FLASK_DEBUG=true
|
|
- SEED_DATA=true
|
|
- DATABASE_URL=postgresql://osa:osa@postgres:5432/osa
|
|
command: ["python", "run.py"]
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: mgmt-postgres
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- POSTGRES_DB=osa
|
|
- POSTGRES_USER=osa
|
|
- POSTGRES_PASSWORD=osa
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U osa"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
args:
|
|
- NODE_IMAGE=node:22-slim
|
|
container_name: mgmt-frontend
|
|
ports:
|
|
- "8080:5173"
|
|
volumes:
|
|
- frontend_node_modules:/app/node_modules
|
|
- ./frontend:/app
|
|
environment:
|
|
- VITE_API_URL=/api
|
|
- API_TARGET=http://mgmt-backend:5001
|
|
command: sh -c "npm ci && npm run dev -- --host"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
frontend_node_modules:
|
|
postgres_data:
|