From d6f0914eebc050d82bcf167a9f23ff90a2a76546 Mon Sep 17 00:00:00 2001 From: WrBug Date: Tue, 9 Dec 2025 01:03:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E8=B7=AF=E5=BE=84=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 start.sh 中健康检查路径:从 /api/health 改为 /api/system/health - 修复 Dockerfile 中健康检查路径:从 /api/health 改为 /api/system/health - 确保健康检查路径与实际 HealthController 端点一致 --- backend/Dockerfile | 2 +- docker/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index b3ddf82..5cbffce 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -41,7 +41,7 @@ EXPOSE 8000 # 健康检查 HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD curl -f http://localhost:8000/api/health || exit 1 + CMD curl -f http://localhost:8000/api/system/health || exit 1 # 启动应用 ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/docker/start.sh b/docker/start.sh index 8bffa6b..b828494 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -60,7 +60,7 @@ BACKEND_PID=$! # 等待后端服务启动 echo "等待后端服务启动..." for i in {1..60}; do - if curl -f http://localhost:8000/api/health > /dev/null 2>&1; then + if curl -f http://localhost:8000/api/system/health > /dev/null 2>&1; then echo "后端服务已启动" break fi