feat(digitalocean): add droplet provisioning support

This commit is contained in:
Andras Bacsai committed 2026-07-08 10:42:58 +02:00
1 parent 5936874ffd
commit c303c34cfd
32 files changed
+2796 -19

No files matched your search

@@ -108,6 +108,22 @@ class ValidateAndInstall extends Component
}
}
if ($this->server->digitalocean_droplet_id) {
$status = $this->server->refreshDigitalOceanState();
$this->server->refresh();
if (in_array($status, ['off', 'archive', 'deleted'], true)) {
$this->error = $status === 'deleted'
? 'DigitalOcean droplet is deleted or no longer accessible. Relink this server before validating.'
: 'DigitalOcean droplet is '.($status ?? 'not running').'. Power it on before validating.';
$this->server->update([
'validation_logs' => $this->error,
]);
return;
}
}
['uptime' => $this->uptime, 'error' => $error] = $this->server->validateConnection();
if (! $this->uptime) {
$sanitizedError = htmlspecialchars($error ?? '', ENT_QUOTES, 'UTF-8');