Files
transcription/docker-compose.production.yml
T
Jim Lancaster 16391463d6
Quality Gate / gate (push) Successful in 2m33s
V6.1 yet more backup/.env cleanup
2026-09-02 11:43:07 -05:00

71 lines
1.7 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
image: transcription:prod
env_file:
- .env.production
environment:
RUN_EMBEDDED_WORKER: "false"
RUNTIME_SETTINGS_ENV_FILE: "/app/.env.production"
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000"
volumes:
- app_uploads:/app/uploads
- app_data:/app/data
- ./backup:/backup
- ./.env.production:/app/.env.production
- ./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
- ./backup:/backup
- ./.env.production:/app/.env.production:ro
- ./prompts:/app/prompts:ro
healthcheck:
disable: true
restart: unless-stopped
postgres:
image: postgres:16-alpine
env_file:
- .env.production
environment:
POSTGRES_DB: ${DATABASE__DATABASE}
POSTGRES_USER: ${DATABASE__USER}
POSTGRES_PASSWORD: ${DATABASE__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: