添加部署文件
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: offerpie-backend-client-nginx
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- xxl-job-network
|
||||
ports:
|
||||
- "10202:80"
|
||||
depends_on:
|
||||
- blue
|
||||
- green
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
cpus: '2'
|
||||
|
||||
blue:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: client-api/Dockerfile
|
||||
container_name: offerpie-backend-client-blue
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- xxl-job-network
|
||||
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
|
||||
networks:
|
||||
- xxl-job-network
|
||||
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'
|
||||
|
||||
networks:
|
||||
xxl-job-network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user