version: '3.8' # Production configuration with Cloudflare Tunnel services: api: build: context: ./api dockerfile: Dockerfile restart: unless-stopped environment: DATABASE_URL: ${DATABASE_URL} DATABASE_URL_SUPABASE: ${DATABASE_URL_SUPABASE} USE_SUPABASE: ${USE_SUPABASE:-false} PYTHONPATH: /app networks: - internal healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 web: build: context: ./web dockerfile: Dockerfile restart: unless-stopped networks: - internal environment: - VITE_API_URL=http://api:8000 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000"] interval: 30s timeout: 10s retries: 3 cloudflared: image: cloudflare/cloudflared:latest restart: unless-stopped command: tunnel --no-autoupdate run environment: - TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN} networks: - internal depends_on: api: condition: service_healthy web: condition: service_healthy networks: internal: driver: bridge