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.'