version: '3.8' services: # ===== Infrastructure ===== postgres: image: postgres:16-alpine environment: POSTGRES_USER: it0 POSTGRES_PASSWORD: it0_dev POSTGRES_DB: it0 ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U it0"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 # ===== API Gateway ===== api-gateway: build: ../../packages/gateway ports: - "8000:8000" - "8001:8001" depends_on: - auth-service - agent-service - ops-service - inventory-service - monitor-service - comm-service - audit-service - redis healthcheck: test: ["CMD", "kong", "health"] interval: 10s timeout: 5s retries: 3 networks: - it0-network # ===== Backend Services ===== auth-service: build: ../../packages/services/auth-service ports: - "3001:3001" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - REDIS_URL=redis://redis:6379 - JWT_SECRET=${JWT_SECRET:-dev-jwt-secret} - AUTH_SERVICE_PORT=3001 depends_on: postgres: condition: service_healthy redis: condition: service_healthy networks: - it0-network agent-service: build: ../../packages/services/agent-service ports: - "3002:3002" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - REDIS_URL=redis://redis:6379 - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - AGENT_ENGINE_TYPE=claude_code_cli - AGENT_SERVICE_PORT=3002 depends_on: postgres: condition: service_healthy redis: condition: service_healthy networks: - it0-network ops-service: build: ../../packages/services/ops-service ports: - "3003:3003" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - REDIS_URL=redis://redis:6379 - OPS_SERVICE_PORT=3003 depends_on: postgres: condition: service_healthy redis: condition: service_healthy networks: - it0-network inventory-service: build: ../../packages/services/inventory-service ports: - "3004:3004" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - VAULT_MASTER_KEY=${VAULT_MASTER_KEY:-dev-vault-key} - INVENTORY_SERVICE_PORT=3004 depends_on: postgres: condition: service_healthy networks: - it0-network monitor-service: build: ../../packages/services/monitor-service ports: - "3005:3005" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - REDIS_URL=redis://redis:6379 - MONITOR_SERVICE_PORT=3005 depends_on: postgres: condition: service_healthy networks: - it0-network comm-service: build: ../../packages/services/comm-service ports: - "3006:3006" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - REDIS_URL=redis://redis:6379 - TWILIO_ACCOUNT_SID=${TWILIO_ACCOUNT_SID} - TWILIO_AUTH_TOKEN=${TWILIO_AUTH_TOKEN} - TWILIO_PHONE_NUMBER=${TWILIO_PHONE_NUMBER} - COMM_SERVICE_PORT=3006 depends_on: postgres: condition: service_healthy redis: condition: service_healthy networks: - it0-network audit-service: build: ../../packages/services/audit-service ports: - "3007:3007" environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USERNAME=it0 - DB_PASSWORD=it0_dev - DB_DATABASE=it0 - AUDIT_SERVICE_PORT=3007 depends_on: postgres: condition: service_healthy networks: - it0-network voice-service: build: ../../packages/services/voice-service ports: - "3008:3008" environment: - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - AGENT_SERVICE_URL=http://agent-service:3002 - WHISPER_MODEL=large-v3 - KOKORO_MODEL=kokoro-82m - DEVICE=cpu depends_on: - agent-service networks: - it0-network # ===== Frontend ===== web-admin: build: ../../it0-web-admin ports: - "3000:3000" environment: - API_BASE_URL=http://api-gateway:8000 - NEXT_PUBLIC_API_BASE_URL=/api/proxy - NEXT_PUBLIC_WS_URL=ws://localhost:8000 depends_on: - api-gateway networks: - it0-network volumes: postgres_data: networks: it0-network: driver: bridge