fix: 修复健康检查路径不一致问题
- 修复 start.sh 中健康检查路径:从 /api/health 改为 /api/system/health - 修复 Dockerfile 中健康检查路径:从 /api/health 改为 /api/system/health - 确保健康检查路径与实际 HealthController 端点一致
This commit is contained in:
+1
-1
@@ -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"]
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user