Commit 2412a31
Switch Ghost healthcheck to nc (BusyBox wget lacks --max-redirect)
The previous fix used `wget --spider -S --max-redirect=0` to stop wget
from following Ghost's http→https redirect. That works on GNU wget but
fails on the BusyBox wget shipped in ghost:6-alpine — BusyBox wget
doesn't recognize --max-redirect, errors out on the unknown option,
and the healthcheck never passes. Container stayed in "health: starting"
forever.
`nc -z localhost 2368` is a plain TCP port check — universally
available via BusyBox, doesn't care about HTTP semantics, answers the
only question that matters: is Ghost listening? If the process is up
and the port is bound, nc exits 0 and Docker marks healthy. If Ghost
crashes or the port isn't bound, nc exits non-zero and Traefik pulls
the backend.
Side benefit: it's also much faster than an HTTP request.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8ef2252 commit 2412a31
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
| |||
0 commit comments