version: '3.8' services: # ── Express AI + Degelas proxy ───────────────────────────────────────────── api-server: build: context: . dockerfile: Dockerfile target: api image: atlas-green-api:latest container_name: atlas-green-api restart: unless-stopped environment: - NODE_ENV=production - PORT=3001 - OPENAI_API_KEY=${OPENAI_API_KEY} - AINFT_API_KEY=${AINFT_API_KEY:-} - AI_API_KEY=${AI_API_KEY:-} - AI_BASE_URL=${AI_BASE_URL:-} - AI_MODEL=${AI_MODEL:-} - AI_MODEL_COMPLEX=${AI_MODEL_COMPLEX:-} - DEGELAS_API_URL=${DEGELAS_API_URL:-} - DEGELAS_API_KEY=${DEGELAS_API_KEY:-} - CLIENT_ORIGIN=${CLIENT_ORIGIN:-*} volumes: - ./generated_docs:/app/generated_docs expose: - "3001" healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:3001/api/health"] interval: 30s timeout: 5s retries: 3 start_period: 10s networks: - default - fullstack_degelas_proxy # ── Nginx frontend ──────────────────────────────────────────────────────── frontend: build: context: . dockerfile: Dockerfile target: frontend image: atlas-green-frontend:latest container_name: atlas-green-frontend restart: unless-stopped ports: - "8081:80" depends_on: api-server: condition: service_healthy networks: - default - fullstack_degelas_proxy networks: fullstack_degelas_proxy: external: true