services: app: build: context: . dockerfile: Dockerfile image: transcription:prod env_file: - .env.production environment: RUN_EMBEDDED_WORKER: "false" depends_on: postgres: condition: service_healthy volumes: - app_uploads:/app/uploads - app_data:/app/data - ./prompts:/app/prompts:ro restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"] interval: 30s timeout: 5s retries: 5 start_period: 20s worker: image: transcription:prod env_file: - .env.production command: ["python", "-m", "transcription.worker_service"] depends_on: postgres: condition: service_healthy volumes: - app_uploads:/app/uploads - app_data:/app/data - ./prompts:/app/prompts:ro healthcheck: disable: true restart: unless-stopped postgres: image: postgres:16-alpine env_file: - .env.production environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - postgres_data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 10 start_period: 10s volumes: postgres_data: app_uploads: app_data: