$errorMessage='Server is not reachable. Please validate your configuration and connection.<br>Check this <a target="_blank" class="underline" href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help. <br><br>Error: '.$error;
$this->server->update([
'validation_logs'=>$errorMessage,
'is_validating'=>false,
]);
Log::error('ValidateAndInstallServer: Server not reachable',[
'server_id'=>$this->server->id,
'error'=>$error,
]);
return;
}
// Validate OS
$supportedOsType=$this->server->validateOS();
if(!$supportedOsType){
$errorMessage='Server OS type is not supported. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$this->server->update([
'validation_logs'=>$errorMessage,
'is_validating'=>false,
]);
Log::error('ValidateAndInstallServer: OS not supported',[
$errorMessage="Prerequisites ({$missingCommands}) could not be installed after {$this->maxTries} attempts. Please install them manually before continuing.";
$errorMessage='Docker Engine could not be installed after '.$this->maxTries.' attempts. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$this->server->update([
'validation_logs'=>$errorMessage,
'is_validating'=>false,
]);
Log::error('ValidateAndInstallServer: Docker installation failed after max tries',[
$errorMessage='Minimum Docker Engine version '.$requiredDockerVersion.' is not installed. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$this->server->update([
'validation_logs'=>$errorMessage,
'is_validating'=>false,
]);
Log::error('ValidateAndInstallServer: Docker version not sufficient',[