From 792d084b4f659426212c942ddfac1de4f4646657 Mon Sep 17 00:00:00 2001 From: m Date: Tue, 24 Mar 2026 23:47:36 +0100 Subject: [PATCH] fix: use node fetch for frontend health check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wget in node:22-alpine can't connect to localhost:3000 — use node's built-in fetch instead, which works correctly. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6edad61..17a35e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: environment: - API_URL=http://backend:8080 healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"] + test: ["CMD", "node", "-e", "fetch('http://localhost:3000').then(r=>{if(!r.ok)throw r.status;process.exit(0)}).catch(()=>process.exit(1))"] interval: 30s timeout: 5s retries: 3