Merge pull request #4167 from Dokploy/fix/server-listen-before-init

fix: start server listener before initialization to prevent healthcheck failures
This commit is contained in:
Mauricio Siu
2026-04-05 17:37:13 -06:00
committed by GitHub

View File

@@ -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) {