fix: server validation
This commit is contained in:
@@ -398,10 +398,10 @@ class Server extends BaseModel
|
||||
}
|
||||
});
|
||||
if ($supported->count() === 1) {
|
||||
ray('supported');
|
||||
// ray('supported');
|
||||
return str($supported->first());
|
||||
} else {
|
||||
ray('not supported');
|
||||
// ray('not supported');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -468,6 +468,16 @@ class Server extends BaseModel
|
||||
}
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$dockerRunning = instant_remote_process(["docker version"], $this);
|
||||
} catch (\Throwable $e) {
|
||||
$this->settings->is_usable = false;
|
||||
$this->settings->save();
|
||||
if ($throwError) {
|
||||
throw new \Exception('Server is not usable. Docker Engine is not running.');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$this->settings->is_usable = true;
|
||||
$this->settings->save();
|
||||
$this->validateCoolifyNetwork(isSwarm: false, isBuildServer: $this->settings->is_build_server);
|
||||
|
||||
Reference in New Issue
Block a user