services: speech-postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-speech} POSTGRES_USER: ${POSTGRES_USER:-speech} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required} volumes: - speech-postgres-data:/var/lib/postgresql/data networks: - speech-internal healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-speech} -d ${POSTGRES_DB:-speech}"] interval: 5s timeout: 5s retries: 10 speech-redis: image: redis:7-alpine restart: unless-stopped command: ["redis-server", "--appendonly", "yes"] volumes: - speech-redis-data:/data networks: - speech-internal speech-api: build: context: ./apps/api network: host restart: unless-stopped environment: DATABASE_URL: postgres://${POSTGRES_USER:-speech}:${POSTGRES_PASSWORD}@speech-postgres:5432/${POSTGRES_DB:-speech}?sslmode=disable REDIS_URL: redis://speech-redis:6379 API_PORT: 8080 COURSE_TASK_MODE: ${COURSE_TASK_MODE:-bank} PRONUNCIATION_STRATEGY: ${PRONUNCIATION_STRATEGY:-statistical} APP_JWT_SECRET: ${APP_JWT_SECRET:?APP_JWT_SECRET is required} CORS_ORIGINS: ${CORS_ORIGINS:?CORS_ORIGINS is required} DEBUG_ENABLED: ${DEBUG_ENABLED:-false} DEBUG_VERBOSE: ${DEBUG_VERBOSE:-false} LOG_LEVEL: ${LOG_LEVEL:-info} AZURE_SPEECH_KEY: ${AZURE_SPEECH_KEY:-} AZURE_SPEECH_REGION: ${AZURE_SPEECH_REGION:-} AZURE_ENABLE_MOCK: ${AZURE_ENABLE_MOCK:-true} DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY:-} MISTRAL_API_KEY: ${MISTRAL_API_KEY:-} depends_on: speech-postgres: condition: service_healthy speech-redis: condition: service_started networks: - speech-internal - caddy speech-web: build: context: ./apps/web dockerfile: Dockerfile.prod network: host args: VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api} restart: unless-stopped depends_on: - speech-api networks: - caddy volumes: speech-postgres-data: speech-redis-data: networks: speech-internal: name: speech-internal internal: true caddy: external: true name: ${CADDY_DOCKER_NETWORK:-web}