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
fixes
Andras Bacsaib57b4f9bd392
diff --git a/app/Http/Livewire/Server/Proxy/Deploy.php b/app/Http/Livewire/Server/Proxy/Deploy.phpindex 74e75a071f..6ca4bca4bb 100644--- a/app/Http/Livewire/Server/Proxy/Deploy.php+++ b/app/Http/Livewire/Server/Proxy/Deploy.php@@ -11,18 +11,13 @@ class Deploy extends Component{public Server $server;public $proxy_settings = null;- protected $listeners = ['proxyStatusUpdated'];- public function proxyStatusUpdated()- {- $this->server->refresh();- }public function start_proxy(){if ($this->server->proxy->last_applied_settings &&$this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings) {- $this->saveConfiguration($this->server);+ $this->emit('saveConfiguration', $server);}$activity = resolve(StartProxy::class)($this->server);$this->emit('newMonitorActivity', $activity->id);@@ -36,8 +31,4 @@ class Deploy extends Component$this->server->save();$this->emit('proxyStatusUpdated');}- private function saveConfiguration(Server $server)- {- $this->emit('saveConfiguration', $server);- }-}+}\ No newline at end of filediff --git a/app/Http/Livewire/Server/Proxy/Status.php b/app/Http/Livewire/Server/Proxy/Status.phpindex 068402b9e5..8791e9cc4c 100644--- a/app/Http/Livewire/Server/Proxy/Status.php+++ b/app/Http/Livewire/Server/Proxy/Status.php@@ -9,20 +9,12 @@ use Livewire\Component;class Status extends Component{public Server $server;- protected $listeners = ['proxyStatusUpdated'];- public function proxyStatusUpdated()- {- $this->server->refresh();- }public function get_status(){- try {- dispatch_sync(new ProxyContainerStatusJob(- server: $this->server- ));- $this->emit('proxyStatusUpdated');- } catch (\Exception $e) {- ray($e->getMessage());- }+ dispatch_sync(new ProxyContainerStatusJob(+ server: $this->server+ ));+ $this->server->refresh();+ $this->emit('proxyStatusUpdated');}}\ No newline at end of filediff --git a/resources/views/components/server/navbar.blade.php b/resources/views/components/server/navbar.blade.phpindex f96d3905ed..499568b1af 100644--- a/resources/views/components/server/navbar.blade.php+++ b/resources/views/components/server/navbar.blade.php@@ -1,5 +1,8 @@<div class="pb-6">- <h1>Server</h1>+ <div class="flex items-center gap-2">+ <h1>Server</h1>+ <livewire:server.proxy.status :server="$server" />+ </div><div class="pt-2 pb-10 ">{{ data_get($server, 'name') }}</div><nav class="navbar-main"><a class="{{ request()->routeIs('server.show') ? 'text-white' : '' }}"@@ -26,9 +29,7 @@]) }}"><button>Destinations</button></a>- @if (request()->routeIs('server.proxy'))- <div class="flex-1"></div>- <livewire:server.proxy.deploy :server="$server" />- @endif+ <div class="flex-1"></div>+ <livewire:server.proxy.deploy :server="$server" /></nav></div>diff --git a/resources/views/components/status/restarting.blade.php b/resources/views/components/status/restarting.blade.phpindex 08a98c0647..b108baab29 100644--- a/resources/views/components/status/restarting.blade.php+++ b/resources/views/components/status/restarting.blade.php@@ -1,5 +1,8 @@+@props([+ 'text' => 'Stopped',+])<x-loading wire:loading.delay />-<div class="flex items-center gap-2 " wire:loading.remove.delay.longer>+<div class="flex items-center gap-2" wire:loading.remove.delay.longer><div class="badge badge-error badge-xs"></div>- <div class="text-xs font-medium tracking-wide text-error">Stopped</div>+ <div class="text-xs font-medium tracking-wide text-error">{{ $text }}</div></div>diff --git a/resources/views/components/status/running.blade.php b/resources/views/components/status/running.blade.phpindex 9528172014..f3c059e017 100644--- a/resources/views/components/status/running.blade.php+++ b/resources/views/components/status/running.blade.php@@ -1,5 +1,8 @@+@props([+ 'text' => 'Running',+])<x-loading wire:loading.delay.longer /><div class="flex items-center gap-2 " wire:loading.remove.delay.longer><div class="badge badge-success badge-xs"></div>- <div class="text-xs font-medium tracking-wide text-success">Running</div>+ <div class="text-xs font-medium tracking-wide text-success">{{ $text }}</div></div>diff --git a/resources/views/components/status/stopped.blade.php b/resources/views/components/status/stopped.blade.phpindex 23d797271e..9867e22a13 100644--- a/resources/views/components/status/stopped.blade.php+++ b/resources/views/components/status/stopped.blade.php@@ -1,5 +1,8 @@+@props([+ 'text' => 'Stopped',+])<x-loading wire:loading.delay.longer /><div class="flex items-center gap-2 " wire:loading.remove.delay.longer><div class="badge badge-error badge-xs"></div>- <div class="text-xs font-medium tracking-wide text-error">Stopped</div>+ <div class="text-xs font-medium tracking-wide text-error">{{ $text }}</div></div>diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex 11b2776630..3ed9cdca64 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -10,7 +10,6 @@@if ($server->proxy->status === 'exited')<x-forms.button wire:click.prevent="change_proxy">Switch Proxy</x-forms.button>@endif- <livewire:server.proxy.status :server="$server" /></div><div class="pt-3 pb-4 ">Traefik v2</div>@if (diff --git a/resources/views/livewire/server/proxy/status.blade.php b/resources/views/livewire/server/proxy/status.blade.phpindex 032c534c65..41fef8efc2 100644--- a/resources/views/livewire/server/proxy/status.blade.php+++ b/resources/views/livewire/server/proxy/status.blade.php@@ -1,9 +1,9 @@-<div wire:poll.10000ms="get_status" x-init="$wire.get_status">+<div wire:poll.3000ms="get_status" x-init="$wire.get_status">@if ($server->proxy->status === 'running')- <x-status.running />+ <x-status.running text="Proxy Running" />@elseif ($server->proxy->status === 'restarting')- <x-status.restarting />+ <x-status.restarting text="Proxy Restarting" />@else- <x-status.stopped />+ <x-status.stopped text="Proxy Stopped" />@endif</div>diff --git a/routes/web.php b/routes/web.phpindex 7620c58eee..18d57474b0 100644--- a/routes/web.php+++ b/routes/web.php@@ -67,7 +67,7 @@ Route::middleware(['auth'])->group(function () {'private_keys' => PrivateKey::ownedByCurrentTeam()->get(),]))->name('server.create');Route::get('/server/{server_uuid}', fn () => view('server.show', [- 'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user'])->whereUuid(request()->server_uuid)->firstOrFail(),+ 'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),]))->name('server.show');Route::get('/server/{server_uuid}/proxy', fn () => view('server.proxy', ['server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),@@ -77,7 +77,7 @@ Route::middleware(['auth'])->group(function () {'privateKeys' => PrivateKey::ownedByCurrentTeam()->get(),]))->name('server.private-key');Route::get('/server/{server_uuid}/destinations', fn () => view('server.destinations', [- 'server' => Server::ownedByCurrentTeam(['name'])->whereUuid(request()->server_uuid)->firstOrFail()+ 'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail()]))->name('server.destinations');});