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
fix: make sure proxy wont start in NONE mode
Andras Bacsaia2f4d4ed6d6b
diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.phpindex da09403cc1..d6ae7eec85 100644--- a/app/Actions/Proxy/StartProxy.php+++ b/app/Actions/Proxy/StartProxy.php@@ -2,6 +2,7 @@namespace App\Actions\Proxy;+use App\Enums\ProxyTypes;use App\Models\Server;use Illuminate\Support\Str;use Lorisleiva\Actions\Concerns\AsAction;@@ -14,7 +15,7 @@ class StartProxy{$commands = collect([]);$proxyType = $server->proxyType();- if ($proxyType === 'none') {+ if ($proxyType === ProxyTypes::NONE->value) {return 'OK';}$proxy_path = get_proxy_path();diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex c5c4554721..392819440f 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -114,7 +114,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncryptedreturn data_get($value, 'Name') === '/coolify-proxy';})->first();if (!$foundProxyContainer) {- ray('Proxy not found, starting it...');if ($this->server->isProxyShouldRun()) {StartProxy::run($this->server, false);$this->server->team->notify(new ContainerRestarted('coolify-proxy', $this->server));diff --git a/app/Models/Server.php b/app/Models/Server.phpindex a53d6ffe50..313040afa7 100644--- a/app/Models/Server.php+++ b/app/Models/Server.php@@ -93,8 +93,11 @@ class Server extends BaseModelpublic function proxyType(){- $type = $this->proxy->get('type');- if (is_null($type)) {+ $proxyType = $this->proxy->get('type');+ if ($proxyType === ProxyTypes::NONE->value) {+ return $proxyType;+ }+ if (is_null($proxyType)) {$this->proxy->type = ProxyTypes::TRAEFIK_V2->value;$this->proxy->status = ProxyStatus::EXITED->value;$this->save();diff --git a/resources/views/components/server/navbar.blade.php b/resources/views/components/server/navbar.blade.phpindex 8230c3a7c9..fbbdc545b8 100644--- a/resources/views/components/server/navbar.blade.php+++ b/resources/views/components/server/navbar.blade.php@@ -2,7 +2,9 @@<livewire:server.proxy.modal :server="$server" /><div class="flex items-center gap-2"><h1>Server</h1>- <livewire:server.proxy.status :server="$server" />+ @if ($server->proxyType() !== 'NONE')+ <livewire:server.proxy.status :server="$server" />+ @endif</div><div class="subtitle ">{{ data_get($server, 'name') }}</div><nav class="navbar-main">