fix: restore production OpenClaw runtime health
This commit is contained in:
@@ -114,7 +114,7 @@ jobs:
|
||||
JWT_AUDIENCE=nexus-web
|
||||
BOOTSTRAP_OWNER_EMAIL=vmbao62@hotmail.de
|
||||
BOOTSTRAP_OWNER_PASSWORD=${ENV_BOOTSTRAP_OWNER_PASSWORD:-}
|
||||
OPENCLAW_BASE_URL=http://host.docker.internal:18789
|
||||
OPENCLAW_BASE_URL=http://openclaw-gateway:18789
|
||||
OPENCLAW_GATEWAY_TOKEN=${ENV_OPENCLAW_TOKEN}
|
||||
OPENCLAW_GATEWAY_PASSWORD=
|
||||
EOF
|
||||
@@ -188,9 +188,10 @@ jobs:
|
||||
WAIT=1
|
||||
while [ $RETRY -lt $MAX ]; do
|
||||
RETRY=$((RETRY + 1))
|
||||
if curl -sf --max-time 10 https://nexus.noveria.net/health; then
|
||||
HEALTH_BODY=$(curl -sf --max-time 10 https://nexus.noveria.net/health || true)
|
||||
if printf '%s' "$HEALTH_BODY" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
|
||||
echo ""
|
||||
echo "✅ Health check passed (attempt $RETRY/$MAX)"
|
||||
echo "✅ Health check passed with Healthy runtime and database state (attempt $RETRY/$MAX)"
|
||||
exit 0
|
||||
fi
|
||||
echo "⏳ Attempt $RETRY/$MAX failed, waiting ${WAIT}s..."
|
||||
@@ -225,8 +226,21 @@ jobs:
|
||||
fi
|
||||
}
|
||||
|
||||
check_health() {
|
||||
local body
|
||||
body=$(curl -sf --max-time 10 "${BASE}/health" || true)
|
||||
printf " %-25s" "Health API:"
|
||||
if printf '%s' "$body" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
|
||||
echo " HTTP 200 Healthy ✅"
|
||||
PASS=$((PASS + 1))
|
||||
else
|
||||
echo " not healthy ❌"
|
||||
FAIL=$((FAIL + 1))
|
||||
fi
|
||||
}
|
||||
|
||||
check "/dashboard" "Dashboard" 200
|
||||
check "/health" "Health API" 200
|
||||
check_health
|
||||
check "/api/v1/operations/snapshot" "Operations API (auth)" 401
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user