fix: proxy start (if not proxy defined, use Traefik)

This commit is contained in:
Andras Bacsai
2023-09-18 09:58:13 +02:00
parent 3ea462efc9
commit 157da798dd
6 changed files with 21 additions and 14 deletions

View File

@@ -41,17 +41,15 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
}
private function checkServerConnection() {
ray("Checking server connection to {$this->server->ip}");
$uptime = instant_remote_process(['uptime'], $this->server, false);
if (!is_null($uptime)) {
ray('Server is up');
return true;
}
}
public function handle(): void
{
try {
ray()->clearAll();
// ray()->clearAll();
$serverUptimeCheckNumber = 0;
$serverUptimeCheckNumberMax = 5;
while (true) {
@@ -216,12 +214,10 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
$isPR = Str::startsWith(data_get($value, 'Name'), "/$uuid");
$isPR = Str::contains(data_get($value, 'Name'), "-pr-");
if ($isPR) {
ray('is pr');
return false;
}
return $value;
})->first();
ray($foundContainer);
if ($foundContainer) {
$containerStatus = data_get($foundContainer, 'State.Status');
$databaseStatus = data_get($application, 'status');