An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor: Add force parameter to StartProxy handle method
Andras Bacsai7c4a722d7229
diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.phpindex 341186beca..991c94b115 100644--- a/app/Actions/Proxy/StartProxy.php+++ b/app/Actions/Proxy/StartProxy.php@@ -11,11 +11,11 @@ class StartProxy{use AsAction;- public function handle(Server $server, bool $async = true): string|Activity+ public function handle(Server $server, bool $async = true, bool $force = false): string|Activity{try {$proxyType = $server->proxyType();- if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop || $server->isBuildServer()) {+ if ((is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop || $server->isBuildServer()) && $force === false) {return 'OK';}$commands = collect([]);diff --git a/app/Livewire/Server/Proxy/Deploy.php b/app/Livewire/Server/Proxy/Deploy.phpindex 6d3f00dc86..965c51e2d8 100644--- a/app/Livewire/Server/Proxy/Deploy.php+++ b/app/Livewire/Server/Proxy/Deploy.php@@ -84,7 +84,7 @@ class Deploy extends Componenttry {$this->server->proxy->force_stop = false;$this->server->save();- $activity = StartProxy::run($this->server);+ $activity = StartProxy::run($this->server, force: true);$this->dispatch('activityMonitor', $activity->id, ProxyStatusChanged::class);} catch (\Throwable $e) {return handleError($e, $this);