mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix: start server listener before initialization to prevent healthcheck failures
Move server.listen() before the initialization block so the HTTP server is already responding when Docker healthchecks begin. Previously, slow operations like SMTP timeouts in sendDokployRestartNotifications() could block the server from listening, causing healthcheck failures and container restarts. Closes #4049
This commit is contained in:
@@ -56,6 +56,8 @@ void app.prepare().then(async () => {
|
||||
setupDockerStatsMonitoringSocketServer(server);
|
||||
}
|
||||
|
||||
server.listen(PORT, HOST);
|
||||
console.log(`Server Started on: http://${HOST}:${PORT}`);
|
||||
if (process.env.NODE_ENV === "production" && !IS_CLOUD) {
|
||||
createDefaultMiddlewares();
|
||||
await initializeNetwork();
|
||||
@@ -65,9 +67,6 @@ void app.prepare().then(async () => {
|
||||
await initVolumeBackupsCronJobs();
|
||||
await sendDokployRestartNotifications();
|
||||
}
|
||||
|
||||
server.listen(PORT, HOST);
|
||||
console.log(`Server Started on: http://${HOST}:${PORT}`);
|
||||
await initEnterpriseBackupCronJobs();
|
||||
|
||||
if (!IS_CLOUD) {
|
||||
|
||||
Reference in New Issue
Block a user