firstOrFail(); $latest_version = get_latest_version_of_coolify(); $current_version = config('version'); if (config('app.env') === 'local') { instant_remote_process([ "sleep 10" ], $server); return; } else { if (!$this->force) { $instance_settings = InstanceSettings::get(); if (!$instance_settings->is_auto_update_enabled) { $this->fail('Auto update is disabled'); } if ($latest_version === $current_version) { $this->fail("Already on latest version"); } if (version_compare($latest_version, $current_version, '<')) { $this->fail("Latest version is lower than current version?!"); } } instant_remote_process([ "curl -fsSL https://coolify-cdn.b-cdn.net/files/upgrade.sh -o /data/coolify/source/upgrade.sh", "bash /data/coolify/source/upgrade.sh $latest_version" ], $server); return; } } catch (\Exception $e) { Log::error($e->getMessage()); $this->fail($e->getMessage()); } } }