fix: check domain on new app via api

This commit is contained in:
Andras Bacsai
2024-07-01 11:39:10 +02:00
parent b86924bc0e
commit dbc235d84a
4 changed files with 166 additions and 5 deletions

View File

@@ -502,7 +502,7 @@ $schema://$host {
$sentinel_found = json_decode($sentinel_found, true);
$status = data_get($sentinel_found, '0.State.Status', 'exited');
if ($status !== 'running') {
ray('Sentinel is not running, starting it...');
// ray('Sentinel is not running, starting it...');
PullSentinelImageJob::dispatch($this);
} else {
// ray('Sentinel is running');

View File

@@ -27,6 +27,11 @@ class ServiceApplication extends BaseModel
instant_remote_process(["docker restart {$container_id}"], $this->service->server);
}
public static function ownedByCurrentTeamAPI(int $teamId)
{
return ServiceApplication::whereRelation('service.environment.project.team', 'id', $teamId)->orderBy('name');
}
public function isLogDrainEnabled()
{
return data_get($this, 'is_log_drain_enabled', false);