fix: 使用 Docker 网关 IP 进行健康检查
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 1m14s
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 1m14s
This commit is contained in:
@@ -57,7 +57,8 @@ jobs:
|
||||
echo "等待后端服务启动..."
|
||||
sleep 15
|
||||
for i in {1..10}; do
|
||||
if curl -f http://localhost:8001/health > /dev/null 2>&1; then
|
||||
# 使用 Docker 默认网桥网关 IP (172.17.0.1) 访问宿主机的端口映射
|
||||
if curl -f http://172.17.0.1:8001/health > /dev/null 2>&1; then
|
||||
echo "✅ 后端服务正常"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user