fix: restore production OpenClaw runtime health
CI - Build & Test / Backend (.NET) (push) Successful in 40s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 2m47s
CI - Build & Test / Security Check (push) Successful in 3s
CI - Build & Test / Deploy Nexus (push) Successful in 34s

This commit is contained in:
AzuTear
2026-07-31 23:08:26 +02:00
parent 6f21d9ba97
commit 144edf58fe
6 changed files with 89 additions and 12 deletions
+20 -4
View File
@@ -61,7 +61,7 @@ JWT_ISSUER=nexus
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_REQUIRED_VERSION=2026.7.1
OPENCLAW_GATEWAY_TOKEN=${ENV_OPENCLAW_TOKEN:-}
OPENCLAW_GATEWAY_PASSWORD=
@@ -141,11 +141,17 @@ for container in nexus-api-1 nexus-web-1; do
done
echo "Checking live health"
health_is_healthy() {
health_body="$(curl -fsS --max-time 10 "$BASE_URL/health")" || return 1
printf '%s' "$health_body" |
grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'
}
retry=0
while [ "$retry" -lt 6 ]; do
retry=$((retry + 1))
if curl -fsS --max-time 10 "$BASE_URL/health" >/dev/null; then
echo "Health check passed"
if health_is_healthy; then
echo "Health check passed with Healthy runtime and database state"
break
fi
if [ "$retry" -eq 6 ]; then
@@ -170,6 +176,16 @@ check() {
fi
}
check_health() {
if health_is_healthy; then
printf '%-28s HTTP 200 (Healthy)\n' "Health"
pass=$((pass + 1))
else
printf '%-28s not healthy\n' "Health"
fail=$((fail + 1))
fi
}
check_post() {
path="$1"
expected="$2"
@@ -184,7 +200,7 @@ check_post() {
}
check "/dashboard" "200" "Dashboard"
check "/health" "200" "Health"
check_health
check "/api/v1/operations/snapshot" "401" "Operations auth"
check_post "/api/v1/chat" "401" "Chat auth"