Files
transcription/docker-compose.production.yml
T
Jim Lancaster 2c6ef46f5f
Quality Gate / gate (push) Failing after 50s
V6 complete
2026-08-26 12:04:43 -05:00

79 lines
1.9 KiB
YAML

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
cloudflared:
image: cloudflare/cloudflared:2026.8.0
env_file:
- .env.production
command: tunnel --no-autoupdate --protocol http2 --config /etc/cloudflared/config.yml run --token ${CLOUDFLARE_TUNNEL_TOKEN}
dns:
- 1.1.1.1
- 1.0.0.1
depends_on:
app:
condition: service_healthy
volumes:
- ./deploy/cloudflared/config.yml:/etc/cloudflared/config.yml:ro
restart: unless-stopped
volumes:
postgres_data:
app_uploads:
app_data: