update cloud no localhost server

This commit is contained in:
Andras Bacsai 2023-08-28 18:02:31 +02:00
parent af30d0831d
commit f48a912287

View File

@ -17,7 +17,11 @@ public function __invoke(bool $force)
$settings = InstanceSettings::get();
ray('Running InstanceAutoUpdateJob');
$localhost_name = 'localhost';
$this->server = Server::where('name', $localhost_name)->firstOrFail();
$this->server = Server::where('name', $localhost_name)->first();
if (!$this->server) {
// No server found, so we are running on local docker container
return;
}
$this->latest_version = get_latest_version_of_coolify();
$this->current_version = config('version');
ray('latest version:' . $this->latest_version . " current version: " . $this->current_version . ' force: ' . $force);