services: nginx: image: nginx:alpine container_name: offerpie-web-nginx restart: unless-stopped ports: - "10302:80" depends_on: - blue - green healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"] interval: 30s timeout: 10s retries: 3 deploy: resources: limits: memory: 128M cpus: '0.25' blue: build: . container_name: offerpie-web-blue restart: unless-stopped expose: - "80" environment: - APP_VERSION=blue - TZ=Asia/Shanghai healthcheck: test: ["CMD", "curl", "-f", "http://localhost:80/"] interval: 30s timeout: 10s retries: 3 start_period: 10s deploy: resources: limits: memory: 128M cpus: '0.25' green: build: . container_name: offerpie-web-green restart: unless-stopped expose: - "80" environment: - APP_VERSION=green - TZ=Asia/Shanghai healthcheck: test: ["CMD", "curl", "-f", "http://localhost:80/"] interval: 30s timeout: 10s retries: 3 start_period: 10s deploy: resources: limits: memory: 128M cpus: '0.25'