mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 01:20:31 +00:00
feat: implement prerequisite validation and installation for server setup
This commit is contained in:
@@ -45,6 +45,15 @@ class ValidateServer
|
||||
throw new \Exception($this->error);
|
||||
}
|
||||
|
||||
$prerequisitesInstalled = $server->validatePrerequisites();
|
||||
if (! $prerequisitesInstalled) {
|
||||
$this->error = 'Prerequisites (git, curl, jq) are not installed. Please install them before continuing or use the validation with installation endpoint.';
|
||||
$server->update([
|
||||
'validation_logs' => $this->error,
|
||||
]);
|
||||
throw new \Exception($this->error);
|
||||
}
|
||||
|
||||
$this->docker_installed = $server->validateDockerEngine();
|
||||
$this->docker_compose_installed = $server->validateDockerCompose();
|
||||
if (! $this->docker_installed || ! $this->docker_compose_installed) {
|
||||
|
||||
Reference in New Issue
Block a user