This commit is contained in:
Joao Patricio 2023-05-12 19:51:07 +01:00
parent 25815988d9
commit 3ba4a5cfb5
2 changed files with 12 additions and 3 deletions

View File

@ -17,8 +17,17 @@ public function __invoke(Server $server)
ProxyTypes::TRAEFIK_V2->value => 'proxy',
};
return instantRemoteProcess([
$container_name = 'coolify-proxy';
$output = instantRemoteProcess([
'if [ -d "projects/'.$folder_name.'" ]; then echo "true"; else echo "false"; fi',
<<<EOT
[[ "$(docker inspect -f '{{.State.Running}}' $container_name 2>/dev/null)" == "true" ]] && echo "true" || echo "false"
EOT,
], $server);
return collect(
explode(PHP_EOL, $output)
)->every(fn($output) => $output === 'true');
}
}

View File

@ -33,9 +33,9 @@ public function runInstallProxy()
public function checkProxySettingsInSync()
{
$status = resolve(CheckProxySettingsInSync::class)($this->server);
$this->is_proxy_settings_in_sync = resolve(CheckProxySettingsInSync::class)($this->server);
$this->is_check_proxy_complete = true;
$this->is_proxy_settings_in_sync = $status === 'true';
}
public function render()