version: '3.8' services: aifit-fastapi: build: context: . dockerfile: Dockerfile container_name: aifit-fastapi ports: - "8000:8000" volumes: - .:/app # hot-reload for dev; remove in prod env_file: - .env # must contain GEMINI_API_KEY=... environment: - PYTHONPATH=/app - FFMPEG_BIN=/usr/bin/ffmpeg - FFPROBE_BIN=/usr/bin/ffprobe # Explicitly pass GEMINI_API_KEY from .env (fallback if env_file doesn't work) - GEMINI_API_KEY=${GEMINI_API_KEY} restart: unless-stopped healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s