73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: offerpie-backend-client-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "443:443"
|
|
- "80:80"
|
|
volumes:
|
|
- /etc/ssl/offerpai:/etc/nginx/ssl:ro
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '1'
|
|
|
|
blue:
|
|
build:
|
|
context: .
|
|
dockerfile: client-api/Dockerfile
|
|
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:
|
|
build:
|
|
context: .
|
|
dockerfile: client-api/Dockerfile
|
|
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'
|