An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix server readiness check in ContainerStatusJob and ServerStatusJob
Andras Bacsai2c4e69ad5072
diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 2501568311..20acb4bc41 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -39,7 +39,9 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted{// ray("checking server status for {$this->server->id}");try {- $this->server->checkServerRediness();+ if (!$this->server->checkServerRediness()) {+ return;+ }$containers = instant_remote_process(["docker container ls -q"], $this->server);if (!$containers) {return;diff --git a/app/Jobs/ServerStatusJob.php b/app/Jobs/ServerStatusJob.phpindex 7d591bc831..4337cecf57 100644--- a/app/Jobs/ServerStatusJob.php+++ b/app/Jobs/ServerStatusJob.php@@ -34,7 +34,9 @@ class ServerStatusJob implements ShouldQueue, ShouldBeEncrypted{ray("checking server status for {$this->server->id}");try {- $this->server->checkServerRediness();+ if (!$this->server->checkServerRediness()) {+ return;+ }$this->cleanup(notify: false);} catch (\Throwable $e) {send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());diff --git a/app/Models/Server.php b/app/Models/Server.phpindex 8e7831f83f..1461f8cdc6 100644--- a/app/Models/Server.php+++ b/app/Models/Server.php@@ -131,7 +131,7 @@ class Server extends BaseModelpublic function checkServerRediness(){if ($this->skipServer()) {- return;+ return false;}$serverUptimeCheckNumber = $this->unreachable_count;$serverUptimeCheckNumberMax = 5;