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:
@@ -24,7 +24,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- API_URL=http://backend:8080
|
- API_URL=http://backend:8080
|
||||||
healthcheck:
|
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
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user