From ac074b51760cc3507ea305c94a6c54eed2dc15be Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Wed, 25 Feb 2026 15:26:12 +0100 Subject: [PATCH] fix(ghost): fix healthchecks for Ghost 6.x (301 redirects to external URL) Ghost 6.x redirects all HTTP requests to the configured external URL. - Docker healthcheck: use node http.get (accepts 301 as healthy) - Controller probe: switch from api (expect 200) to http (any response) Co-Authored-By: Claude Opus 4.6 --- templates/ghost/.felhom.yml | 5 +---- templates/ghost/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/ghost/.felhom.yml b/templates/ghost/.felhom.yml index 2c3f5c1..d093bcf 100644 --- a/templates/ghost/.felhom.yml +++ b/templates/ghost/.felhom.yml @@ -56,8 +56,5 @@ app_info: # --- Controller-side health probe --- healthcheck: checks: - - type: api + - type: http port: 2368 - path: "/ghost/api/v4/admin/site/" - expect: - status: 200 diff --git a/templates/ghost/docker-compose.yml b/templates/ghost/docker-compose.yml index 3d5aa13..37ef9c3 100644 --- a/templates/ghost/docker-compose.yml +++ b/templates/ghost/docker-compose.yml @@ -26,7 +26,7 @@ services: limits: memory: 512M healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:2368/ghost/api/v4/admin/site/"] + test: ["CMD", "node", "-e", "require('http').get('http://localhost:2368/',r=>{process.exit(r.statusCode<400?0:1)}).on('error',()=>process.exit(1))"] interval: 30s timeout: 5s retries: 3