mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-26 09:20:54 -04:00
feat(sentinel): make sentinel mandatory on regular servers
Remove the enable/disable toggle from the server UI, logs page, and Sentinel API so is_sentinel_enabled is derived and read-only. Enable existing regular servers via migration, start Sentinel after validate- and-install, and drop the daily ServerManagerJob restart.
This commit is contained in:
@@ -972,17 +972,20 @@ $siteAddress {
|
||||
return Carbon::parse($this->sentinel_updated_at)->isAfter(now()->subSeconds($this->waitBeforeDoingSshCheck()));
|
||||
}
|
||||
|
||||
public function isSentinelEnabled()
|
||||
public function isSentinelEnabled(): bool
|
||||
{
|
||||
return ($this->isMetricsEnabled() || $this->isServerApiEnabled()) && ! $this->isBuildServer();
|
||||
return ! $this->isBuildServer()
|
||||
&& ! $this->isSwarm()
|
||||
&& ! $this->isForceDisabled()
|
||||
&& ! $this->isTransferredAway();
|
||||
}
|
||||
|
||||
public function isMetricsEnabled()
|
||||
public function isMetricsEnabled(): bool
|
||||
{
|
||||
return $this->settings->is_metrics_enabled;
|
||||
}
|
||||
|
||||
public function isServerApiEnabled()
|
||||
public function isServerApiEnabled(): bool
|
||||
{
|
||||
return $this->settings->is_sentinel_enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user