version: '3.8' services: # PostgreSQL database postgres: image: postgres:15-alpine environment: POSTGRES_DB: comboflow POSTGRES_USER: comboflow POSTGRES_PASSWORD: comboflow ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U comboflow"] interval: 10s timeout: 5s retries: 5 # Redis cache redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 5 # Orchestrator service orchestrator: build: context: . dockerfile: Dockerfile ports: - "8080:8080" environment: NODE_ENV: production PORT: 8080 DATABASE_URL: postgresql://comboflow:comboflow@postgres:5432/comboflow REDIS_URL: redis://redis:6379 depends_on: postgres: condition: service_healthy redis: condition: service_healthy healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 # Frontend webapp: build: context: ./webapp dockerfile: Dockerfile ports: - "3000:3000" environment: NODE_ENV: production NEXT_PUBLIC_ORCH_URL: http://orchestrator:8080 depends_on: - orchestrator volumes: postgres_data: redis_data: