修复健康检查

This commit is contained in:
yml2213
2026-09-04 17:07:47 +08:00
parent 182b21f192
commit da3c2f461b
4 changed files with 34 additions and 8 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ HFB_SHOW_DIR=../hfb_show
- 通过 Caddy 自动申请或续签 HTTPS 证书。
- 等待 MySQL、Redis 就绪。
- 按顺序执行尚未应用的数据库迁移。
- 重启后端并检查 `https://你的域名/api/health`。
- 重启后端并在容器内检查 `http://127.0.0.1:8080/api/health`。默认不依赖公网 DNS、TLS 或 Caddy;如需检查公网入口,可设置 `PROD_HEALTH_URL=https://你的域名/api/health`。
如需部署完成后直接跟随查看后端日志:
+6
View File
@@ -104,6 +104,12 @@ services:
condition: service_healthy
expose:
- "8080"
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null -T 5 http://127.0.0.1:8080/api/health"]
interval: 10s
timeout: 6s
retries: 12
start_period: 10s
beszel:
image: henrygd/beszel:0.18.7