amazon-transcreation/docker-compose.prod.yml
Vadym Samoilenko f60b7261b5 Add Azure AD MSAL SSO (SPA token exchange)
- Backend: Azure AD JWKS validator with 24h cache, new POST /api/v1/auth/sso/login
  endpoint, sso_login() in AuthService with auto-provisioning, password_hash made
  nullable, auth_provider column added, Alembic migration c1d2e3f4a5b6
- Frontend: @azure/msal-browser, msal.ts config singleton, ssoLogin() API function,
  login page updated with SSO button and redirect callback handling
- Deploy: frontend Dockerfile and docker-compose.prod.yml updated to bake Azure AD
  vars into the image at build time; deploy.sh validates SSO config on init/deploy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:08:46 +01:00

86 lines
2 KiB
YAML

services:
db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-transcreation}
POSTGRES_PASSWORD: ${DB_PASSWORD:-transcreation}
POSTGRES_DB: ${DB_NAME:-transcreation}
ports:
- "127.0.0.1:5492:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-transcreation}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "127.0.0.1:6389:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "127.0.0.1:8040:8000"
env_file:
- .env
volumes:
- ./storage:/storage
- ./seed:/app/seed
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
celery_worker:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
volumes:
- ./storage:/storage
- ./seed:/app/seed
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: celery -A app.tasks.celery_app worker --loglevel=info --concurrency=4
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=/amazon-transcreation
- NEXT_PUBLIC_WS_URL=
- NEXT_PUBLIC_BASE_PATH=/amazon-transcreation
- NEXT_PUBLIC_AZURE_AD_TENANT_ID=${AZURE_AD_TENANT_ID}
- NEXT_PUBLIC_AZURE_AD_CLIENT_ID=${AZURE_AD_CLIENT_ID}
- NEXT_PUBLIC_AZURE_AD_SSO_ENABLED=${AZURE_AD_SSO_ENABLED:-false}
restart: unless-stopped
ports:
- "127.0.0.1:3050:3000"
environment:
- NODE_ENV=production
depends_on:
- backend
volumes:
pgdata: