-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The healthcheck in docker-compose.yml always calls localhost:3001:
healthcheck:
test:
[
"CMD",
"bun",
"--silent",
"-e",
"fetch('http://localhost:3001/health').then(r => process.exit(r.ok ? 0 : 1))",
]Deployments that set API_PORT to a different value will be marked unhealthy even when running correctly.
Impact
- Containers with non-default
API_PORTwill fail health checks - Kubernetes/Docker orchestration may repeatedly restart healthy containers
- False negative health status in production deployments
Recommendation
Update the healthcheck to dynamically use the API_PORT environment variable:
healthcheck:
test:
[
"CMD",
"bun",
"--silent",
"-e",
"fetch(\`http://localhost:\${process.env.API_PORT || 3001}/health\`).then(r => process.exit(r.ok ? 0 : 1))",
]Priority
Medium - affects deployment reliability but only when using non-default ports
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels