feat: implement prerequisite validation and installation for server setup

This commit is contained in:
Andras Bacsai
2025-11-21 09:49:33 +01:00
parent ce4f8d02a2
commit 01957f2752
9 changed files with 218 additions and 32 deletions

View File

@@ -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) {