Skip to content

Commit 3606761

Browse files
authored
Merge pull request #4167 from Dokploy/fix/server-listen-before-init
fix: start server listener before initialization to prevent healthcheck failures
2 parents df7e1da + cc74f9e commit 3606761

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/dokploy/server/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ void app.prepare().then(async () => {
5656
setupDockerStatsMonitoringSocketServer(server);
5757
}
5858

59+
server.listen(PORT, HOST);
60+
console.log(`Server Started on: http://${HOST}:${PORT}`);
5961
if (process.env.NODE_ENV === "production" && !IS_CLOUD) {
6062
createDefaultMiddlewares();
6163
await initializeNetwork();
@@ -65,9 +67,6 @@ void app.prepare().then(async () => {
6567
await initVolumeBackupsCronJobs();
6668
await sendDokployRestartNotifications();
6769
}
68-
69-
server.listen(PORT, HOST);
70-
console.log(`Server Started on: http://${HOST}:${PORT}`);
7170
await initEnterpriseBackupCronJobs();
7271

7372
if (!IS_CLOUD) {

0 commit comments

Comments
 (0)