68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: offerpie-backend-client-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "10202:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
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'
|