ci: 修复后端健康检查的单引号嵌套截断问题,改用 frontend 容器 wget 探测 server
This commit is contained in:
1 parent
54f5f15b47
commit
1555c8020a
1 file changed
+2
-2
@@ -124,10 +124,10 @@ jobs:
|
||||
fi
|
||||
echo "前端 OK"
|
||||
|
||||
echo "===== 后端健康 (/health 容器内自检,带重试) ====="
|
||||
echo "===== 后端健康 (frontend 容器 wget → server:8788,带重试) ====="
|
||||
BOK=0
|
||||
for i in $(seq 1 60); do
|
||||
if docker exec perler-lab-server node -e "fetch('http://localhost:8788/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" 2>/dev/null; then BOK=1; break; fi
|
||||
if docker exec perler-lab-frontend wget -qO- http://server:8788/health >/dev/null 2>&1; then BOK=1; break; fi
|
||||
sleep 5
|
||||
done
|
||||
if [ "$BOK" != "1" ]; then
|
||||
|
||||
Reference in new issue
Block a user