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
Refactor PullSentinelImageJob.php to only start Sentinel if local version is outdated
Andras Bacsai781bf52a8ea9
diff --git a/app/Jobs/PullSentinelImageJob.php b/app/Jobs/PullSentinelImageJob.phpindex 8e41adecff..4293ae030a 100644--- a/app/Jobs/PullSentinelImageJob.php+++ b/app/Jobs/PullSentinelImageJob.php@@ -39,12 +39,11 @@ class PullSentinelImageJob implements ShouldQueue, ShouldBeEncryptedreturn;}$local_version = instant_remote_process(['docker exec coolify-sentinel sh -c "curl http://127.0.0.1:8888/api/version"'], $this->server, '0.0.0');- if ($version === $local_version) {- ray('Sentinel image is up to date');+ if (version_compare($local_version, $version, '<')) {+ StartSentinel::run($this->server, $version, true);return;}- ray('Pulling Sentinel image');- StartSentinel::run($this->server, $version, true);+ ray('Sentinel image is up to date');} catch (\Throwable $e) {send_internal_notification('PullSentinelImageJob failed with: ' . $e->getMessage());ray($e->getMessage());