fix: use node fetch for frontend health check

wget in node:22-alpine can't connect to localhost:3000 — use
node's built-in fetch instead, which works correctly.
This commit is contained in:
m
2026-03-24 23:47:36 +01:00
parent ff9a6f3866
commit 792d084b4f

View File

@@ -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