wip: swarm

fix: gitcompose deployments
This commit is contained in:
Andras Bacsai committed 2023-11-29 14:59:06 +01:00
1 parent 2d7bbbe300
commit f4803ad58b
12 files changed
+149 -96

No files matched your search

+20 -6
View File
@@ -58,11 +58,25 @@ class Deploy extends Component
public function stop()
{
instant_remote_process([
"docker rm -f coolify-proxy",
], $this->server);
$this->server->proxy->status = 'exited';
$this->server->save();
$this->emit('proxyStatusUpdated');
try {
if ($this->server->isSwarm()) {
instant_remote_process([
"docker service rm coolify-proxy_traefik",
], $this->server);
$this->server->proxy->status = 'exited';
$this->server->save();
$this->emit('proxyStatusUpdated');
} else {
instant_remote_process([
"docker rm -f coolify-proxy",
], $this->server);
$this->server->proxy->status = 'exited';
$this->server->save();
$this->emit('proxyStatusUpdated');
}
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ class Status extends Component
protected $listeners = ['proxyStatusUpdated', 'startProxyPolling'];
public function startProxyPolling()
{
$this->polling = true;
$this->checkProxy();
}
public function proxyStatusUpdated()
{