services: # ─── FastAPI Backend ─────────────────────────────────── backend: build: ./backend ports: - "8000:8000" volumes: - ./backend/app:/app/app # Hot reload - studio-data:/data # Persistent storage - ./client_secrets.json:/data/client_secrets.json:ro # YouTube OAuth (optional) environment: - PEXELS_API_KEY=${PEXELS_API_KEY:-} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-} - ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-claude-sonnet-4-20250514} - CORS_ORIGINS=http://localhost:5173,http://localhost:3000 restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"] interval: 10s timeout: 5s retries: 3 # ─── React Frontend (Vite dev server) ────────────────── frontend: image: node:20-slim working_dir: /app ports: - "5173:5173" volumes: - ./frontend:/app - node_modules:/app/node_modules command: sh -c "npm install && npm run dev -- --host 0.0.0.0" environment: - VITE_API_BASE_URL=http://localhost:8000/api depends_on: backend: condition: service_healthy volumes: studio-data: driver: local node_modules: driver: local