version: "3.9" services: db: image: postgres:16-alpine environment: POSTGRES_USER: recon POSTGRES_PASSWORD: recon POSTGRES_DB: recon ports: - "5432:5432" volumes: - pg_data:/var/lib/postgresql/data - ./supabase/migrations:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U recon"] interval: 5s timeout: 5s retries: 5 agent: build: context: ./services/agent ports: - "8000:8000" environment: - SUPABASE_URL=${SUPABASE_URL} - SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} depends_on: db: condition: service_healthy volumes: - ./services/agent:/app command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload web: image: node:20-alpine working_dir: /app ports: - "3000:3000" environment: - NEXT_PUBLIC_AGENT_API_URL=http://localhost:8000 volumes: - ./apps/web:/app command: sh -c "npm install && npm run dev" depends_on: - agent volumes: pg_data: