mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 16:15:17 +00:00
feat(servers): add cross-instance server migration (#11075)
This commit is contained in:
1 parent
c15e3b35fd
commit
f9caa5250d
36 files changed
+7675
-15
No files matched your search
@@ -862,8 +862,29 @@ $schema://$host {
|
||||
return $this->settings->force_disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server was migrated away from this Coolify instance (source side).
|
||||
* Must not be revalidated or re-enabled as a live managed host.
|
||||
*/
|
||||
public function isTransferredAway(): bool
|
||||
{
|
||||
return data_get($this->server_metadata, 'transfer.status') === 'transferred';
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this server may be validated / installed against from this instance.
|
||||
*/
|
||||
public function canBeValidated(): bool
|
||||
{
|
||||
return ! $this->isTransferredAway();
|
||||
}
|
||||
|
||||
public function forceEnableServer()
|
||||
{
|
||||
if ($this->isTransferredAway()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->settings->force_disabled = false;
|
||||
$this->settings->save();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user