修改
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
services:
|
||||
# ====================== Nginx 反向代理 ======================
|
||||
nginx:
|
||||
image: urban-lifeline-web:${IMAGE_VERSION:-latest}
|
||||
image: nginx:alpine
|
||||
container_name: urban-lifeline-nginx
|
||||
restart: unless-stopped
|
||||
profiles: ["infra", "all"]
|
||||
@@ -23,6 +23,9 @@ services:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
# SSL 证书(可选)
|
||||
# - ./nginx/ssl:/etc/nginx/ssl:ro
|
||||
depends_on:
|
||||
- urban-lifeline-serv
|
||||
- urban-lifeline-web
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 30s
|
||||
@@ -30,6 +33,73 @@ services:
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# ====================== 后端服务 All-in-One ======================
|
||||
urban-lifeline-serv:
|
||||
image: urban-lifeline-serv:${IMAGE_VERSION:-latest}
|
||||
container_name: urban-lifeline-serv
|
||||
restart: unless-stopped
|
||||
profiles: ["infra", "serv", "all"]
|
||||
networks:
|
||||
- urban-lifeline
|
||||
expose:
|
||||
- "8080"
|
||||
- "8081"
|
||||
- "8082"
|
||||
- "8083"
|
||||
- "8084"
|
||||
- "8085"
|
||||
- "8086"
|
||||
- "8087"
|
||||
- "8088"
|
||||
- "8089"
|
||||
- "8090"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
||||
NACOS_SERVER_ADDR: nacos:8848
|
||||
NACOS_NAMESPACE: ${NACOS_NAMESPACE:-}
|
||||
volumes:
|
||||
- ${DATA_ROOT:-../volumes}/logs/serv:/app/logs
|
||||
depends_on:
|
||||
nacos:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 180s
|
||||
|
||||
# ====================== 前端服务 All-in-One ======================
|
||||
urban-lifeline-web:
|
||||
image: urban-lifeline-web:${IMAGE_VERSION:-latest}
|
||||
container_name: urban-lifeline-web
|
||||
restart: unless-stopped
|
||||
profiles: ["infra", "web", "all"]
|
||||
networks:
|
||||
- urban-lifeline
|
||||
expose:
|
||||
- "8000"
|
||||
- "8001"
|
||||
- "8002"
|
||||
- "8003"
|
||||
- "8004"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
SHARED_PORT: 8000
|
||||
PLATFORM_PORT: 8001
|
||||
WORKCASE_PORT: 8002
|
||||
BIDDING_PORT: 8003
|
||||
WORKCASE_WECHAT_PORT: 8004
|
||||
volumes:
|
||||
- ${DATA_ROOT:-../volumes}/logs/web:/app/logs
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# ====================== Nacos 注册中心 ======================
|
||||
nacos:
|
||||
image: nacos/nacos-server:v3.1.0
|
||||
|
||||
Reference in New Issue
Block a user