Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/scripts/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ def patch_compose() -> None:
" env_file:\n"
" - .env\n"
" healthcheck:\n"
# Ghost redirects http→https when the Host header doesn't match its
# configured url, so a naive wget follows back out through Traefik
# and dies on setups without hairpin NAT. --max-redirect=0 stops
# the follow; we accept any HTTP response line as "Ghost is up".
' test: ["CMD-SHELL", "wget --spider -S --max-redirect=0 -T 3 '
"http://localhost:2368/ghost/api/admin/site/ 2>&1 | grep -q 'HTTP/1'\"]\n"
# TCP port check. BusyBox (Alpine) wget doesn't support
# --max-redirect, so the HTTP-response approach fails; nc -z is
# universally available and answers the only question that matters
# for readiness: is Ghost listening on 2368?
' test: ["CMD", "nc", "-z", "localhost", "2368"]\n'
" interval: 30s\n"
" timeout: 5s\n"
" retries: 5\n"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/test-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ grep -q 'SERVICE_URL_ANALYTICS_3000: ""' compose.yml
grep -q 'SERVICE_URL_ACTIVITYPUB_8080: ""' compose.yml

echo "→ assert Ghost healthcheck injected"
grep -q 'localhost:2368/ghost/api/admin/site' compose.yml
grep -q '"nc", "-z", "localhost", "2368"' compose.yml

echo "→ assert mail vars exposed to Coolify UI"
# shellcheck disable=SC2016 # literal compose ${...} syntax, no shell expansion wanted
Expand Down