fix(deploy): close container final review

This commit is contained in:
2026-07-12 00:44:39 +02:00
parent 0ca6346f75
commit a3a266fd81
30 changed files with 526 additions and 37 deletions
+19 -2
View File
@@ -43,7 +43,24 @@ compose up --build --wait core frontend
published=$(compose port frontend 8080)
http_port=${published##*:}
curl --fail --silent --show-error "http://127.0.0.1:$http_port/health" >/dev/null
assert_health() {
health_headers=$(mktemp)
health_body=$(mktemp)
if ! curl --fail --silent --show-error --dump-header "$health_headers" \
"http://127.0.0.1:$http_port/health" >"$health_body"; then
rm -f "$health_headers" "$health_body"
return 1
fi
if ! grep -qi '^content-type: application/json' "$health_headers" ||
! jq -e 'type == "object" and keys == ["status"] and .status == "ok"' \
"$health_body" >/dev/null; then
rm -f "$health_headers" "$health_body"
return 1
fi
rm -f "$health_headers" "$health_body"
}
assert_health
# The nginx proxy must preserve streaming semantics for the backend SSE endpoint.
headers=$(mktemp)
@@ -68,5 +85,5 @@ persisted=$(compose exec -T core sh -c 'cat /data/.compose-smoke-marker')
[ "$persisted" = "$marker" ]
compose exec -T core rm -f /data/.compose-smoke-marker
curl --fail --silent --show-error "http://127.0.0.1:$http_port/health" >/dev/null
assert_health
echo "Compose health, SSE proxy, and restart persistence checks passed."