# Gateway Module - Docker Compose Configuration # # Port Allocation: # 11000 - API Gateway (ONLY externally exposed port) # # This is the single entry point for all didiAI services. # All requests require Bearer token authentication. # # Routes: # /llm/ → LLM Inference API # /audio/ → Audio Transcription API # /web/ → Web Fact-checking API # /catalog/ → Catalog API (internal monitoring) # /embeddings/ → Embeddings API # /rerank/ → Rerank API # /health → Gateway health (no auth) # # Naming Convention: didiAI-{module}-{service} # # Network: # Uses deploy_default network (shared with other modules) networks: didi-network: external: true # single shared network for all DIDI + AI platform stacks services: gateway: container_name: didiAI-gateway image: nginx:1.27-alpine ports: - "11000:11000" networks: - didi-network volumes: - ./nginx.conf.template:/etc/nginx/nginx.conf.template:ro environment: - GATEWAY_API_TOKEN=${GATEWAY_API_TOKEN} command: > /bin/sh -c "envsubst '$$GATEWAY_API_TOKEN' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'" healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:11000/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s restart: unless-stopped