services: nginx: image: nginx:alpine container_name: offerpie-ai-nginx restart: unless-stopped ports: - "10502:80" depends_on: - blue - green healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"] interval: 30s timeout: 10s retries: 3 deploy: resources: limits: memory: 256M cpus: '1' blue: build: . container_name: offerpie-ai-blue restart: unless-stopped expose: - "8000" environment: - APP_VERSION=blue - ENV=pro - TZ=Asia/Shanghai healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health/"] interval: 30s timeout: 10s retries: 3 start_period: 20s volumes: - /logs/offerpie-ai:/app/app/logs deploy: resources: limits: memory: 2G cpus: '2' green: build: . container_name: offerpie-ai-green restart: unless-stopped expose: - "8000" environment: - APP_VERSION=green - ENV=pro - TZ=Asia/Shanghai healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health/"] interval: 30s timeout: 10s retries: 3 start_period: 20s volumes: - /logs/offerpie-ai:/app/app/logs deploy: resources: limits: memory: 2G cpus: '2'