Bug: Docker healthcheck always reports healthy (process.exit never called) #121
Labels
No Label
P0 Critical
P1 High
P2 Medium
P3 Low
accessibility
backend
bug
content
data-integrity
enhancement
frontend
infra
integration
owner
owner-input
performance
performance
phase-7
phase-8
security
seo
ui
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Queue-North-Website#121
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Dockerfile HEALTHCHECK CMD uses:
The
.then(r => r.ok ? 0 : 1)returns a value inside the Promise chain, butnode -eexits with code 0 after the expression evaluates. The resolved Promise value does not set the process exit code. The|| exit 1only catches ifnodeitself crashes, not if the health check fails.Result: the health check ALWAYS reports healthy, even if the Express server is down or returning 500 errors.
Fix
Use
process.exit()inside the then/catch:This ensures the node process exits with the correct code.
Files
Severity
Medium — Docker will never detect an unhealthy container