配置优化:添加Actuator健康检查依赖并优化Docker部署配置

This commit is contained in:
2025-10-14 20:32:28 +08:00
parent cfd1f7a492
commit 388199279a
3 changed files with 23 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ services:
container_name: light-delivery-container
ports:
- "8080:8080"
- "8443:8443"
- "8443:443" # 修改这行将宿主机8443端口映射到容器443端口
environment:
- SPRING_DATASOURCE_PASSWORD=Hu@ng1998!
- KEY_STORE_PASSWORD=k7cP6QLgJDkX
@@ -23,11 +23,11 @@ services:
networks:
- light-network
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:8443/actuator/health", "--insecure"]
test: ["CMD", "wget", "--no-check-certificate", "-qO-", "https://localhost:443/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
start_period: 40s
networks:
light-network: