Files
offerpai_backend/docker-compose.client-api.yml
2026-05-28 09:43:44 +08:00

66 lines
1.5 KiB
YAML

services:
nginx:
image: nginx:alpine
container_name: offerpie-backend-client-nginx
restart: unless-stopped
ports:
- "10202:80"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
memory: 256M
cpus: '1'
blue:
image: offerpie-backend-client:latest
container_name: offerpie-backend-client-blue
restart: unless-stopped
expose:
- "8080"
environment:
- APP_VERSION=blue
- PROFILES_ACTIVE=prod
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/public/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
- /logs/offerpie-backend-client:/app/logs
deploy:
resources:
limits:
memory: 2G
cpus: '2'
green:
image: offerpie-backend-client:latest
container_name: offerpie-backend-client-green
restart: unless-stopped
expose:
- "8080"
environment:
- APP_VERSION=green
- PROFILES_ACTIVE=prod
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/public/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
- /logs/offerpie-backend-client:/app/logs
deploy:
resources:
limits:
memory: 2G
cpus: '2'