mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-19 10:27:41 -05:00
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.
This commit is contained in:
1 parent
53d46303cd
commit
072e96c08e
2 files changed
+6
-4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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.'
|
||||
|
||||
|
||||
Reference in new issue
Block a user