From 072e96c08ebd830b333b958a6ad65f7b053e3ca3 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 3 Nov 2026 16:19:28 -0500 Subject: [PATCH] fix(ci): expect the role-aware image healthcheck in the server smoke The image HEALTHCHECK became /app/healthcheck.sh when the worker role was added (54ad7ee8), but the container smoke still required the old inline curl probe, so every Server image validation since then failed before publishing. Expect the script form and describe it in the storage docs. --- docs/nest-storage.md | 8 +++++--- scripts/Test-ServerContainer.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/nest-storage.md b/docs/nest-storage.md index 20941b1b..737ffef5 100644 --- a/docs/nest-storage.md +++ b/docs/nest-storage.md @@ -1163,9 +1163,11 @@ Runtime contract: database stays `OPENNEST_DB=/app/data/nests.db`, and the [update feed mirror](#update-feed-mirror) caches packages in `/app/data/updates`. The server also needs the container's writable `/tmp`: multipart uploads over 64 KiB are buffered there. -- `HEALTHCHECK` runs `curl --fail http://127.0.0.1:8090/healthz` (interval 30 s, - timeout 5 s, start period 10 s, retries 3, and a 2 s start interval during the - start period on Docker 25+). curl is in the image only for it. +- `HEALTHCHECK` runs `/app/healthcheck.sh` (interval 30 s, timeout 5 s, start + period 10 s, retries 3, and a 2 s start interval during the start period on + Docker 25+). For the server role it runs + `curl --fail http://127.0.0.1:8090/healthz`; for the worker role see + [server nesting](server-nesting.md). curl is in the image only for it. - A read-only or unwritable data location fails startup: the process exits rather than serving requests it cannot store. - Uploads: Kestrel's default 30,000,000-byte request limit covers the whole diff --git a/scripts/Test-ServerContainer.sh b/scripts/Test-ServerContainer.sh index fffa89c0..e34ca8a6 100755 --- a/scripts/Test-ServerContainer.sh +++ b/scripts/Test-ServerContainer.sh @@ -176,7 +176,7 @@ healthcheck=$(docker_local image inspect --format '{{.Config.Healthcheck.Test}} labels=$(docker_local image inspect --format '{{index .Config.Labels "org.opencontainers.image.source"}} {{index .Config.Labels "org.opencontainers.image.version"}} {{index .Config.Labels "org.opencontainers.image.revision"}}' "$image") printf 'user=%s\nhealthcheck=%s\nsource/version/revision=%s\n' "$image_user" "$healthcheck" "$labels" >> "$run_results/image.log" [[ "$image_user" =~ ^[1-9][0-9]*$ ]] || fail 'Image must declare a numeric non-root USER.' -[[ "$healthcheck" == '[CMD curl --fail --silent --show-error http://127.0.0.1:8090/healthz] 30s 5s 10s 2s 3' ]] \ +[[ "$healthcheck" == '[CMD /app/healthcheck.sh] 30s 5s 10s 2s 3' ]] \ || fail 'Image HEALTHCHECK does not match the documented probe.' [[ "$labels" == 'https://github.com/ajisaacs/OpenNest '?*' '?* ]] || fail 'Image OCI source/version/revision labels are missing.'