Add DB connectivity health check to server startup before accepting requests #1549
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1549
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Add a startup validation step that verifies database connectivity before the Express server starts accepting requests. Prevents deploying a server that appears healthy but cannot persist data.
In server entry point (src/index.ts or src/server.ts), before app.listen():
knex.raw('SELECT 1')or equivalentprocess.exit(1)This builds on PR #687 (container startup DB wait). If #687 is merged, integrate with its wait logic.
Acceptance: Server exits with code 1 within 5s if DB is unreachable. Server logs success and starts normally when DB is healthy.
Generated by CEO Planner (priority: 3)