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 Bacsai1304631aad87
diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.phpindex 961fde6a86..d5e5c613d8 100644--- a/app/Http/Livewire/Server/Form.php+++ b/app/Http/Livewire/Server/Form.php@@ -44,7 +44,7 @@ class Form extends Componentpublic function validateServer(){try {- $this->uptime = instant_remote_process(['uptime'], $this->server, false);+ $this->uptime = instant_remote_process(['uptime'], $this->server);if ($this->uptime) {$this->server->settings->is_reachable = true;$this->server->settings->save();@@ -61,7 +61,10 @@ class Form extends Component$this->emit('serverValidated');}} catch (\Exception $e) {- return general_error_handler(err: $e, that: $this);+ $this->server->settings->is_reachable = false;+ $this->server->settings->is_usable = false;+ $this->server->settings->save();+ return general_error_handler(customErrorMessage: "Server is not reachable. Reason: {$e->getMessage()}", that: $this);}}public function delete()diff --git a/app/Http/Livewire/Server/PrivateKey.php b/app/Http/Livewire/Server/PrivateKey.phpindex e295b16164..acfd864d51 100644--- a/app/Http/Livewire/Server/PrivateKey.php+++ b/app/Http/Livewire/Server/PrivateKey.php@@ -21,6 +21,9 @@ class PrivateKey extends ComponentToaster::success('Server is reachable with this private key.');}} catch (\Exception $e) {+ $this->server->settings->is_reachable = false;+ $this->server->settings->is_usable = false;+ $this->server->settings->save();return general_error_handler(customErrorMessage: "Server is not reachable. Reason: {$e->getMessage()}", that: $this);}}diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.phpindex 6c34fd682f..7049cd1735 100644--- a/app/Http/Livewire/Server/Proxy.php+++ b/app/Http/Livewire/Server/Proxy.php@@ -66,6 +66,7 @@ class Proxy extends Component$this->server->proxy->last_saved_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value;$this->server->proxy->redirect_url = $this->redirect_url;$this->server->save();+instant_remote_process(["echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml",], $this->server);diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex 03e7f18747..c009183c4f 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -7,41 +7,46 @@<div wire:loading wire:target="checkProxySettingsInSync"><x-loading /></div>- @isset($proxy_settings)- @if ($selectedProxy->value === 'TRAEFIK_V2')- <form wire:submit.prevent='saveConfiguration'>- <div class="flex items-center gap-2">- <h2>Proxy</h2>- <x-forms.button type="submit">Save</x-forms.button>- @if ($server->proxy->status === 'exited')- <x-forms.button wire:click.prevent="switchProxy">Switch Proxy</x-forms.button>+ <div wire:loading.remove>+ @if ($proxy_settings)+ @if ($selectedProxy->value === 'TRAEFIK_V2')+ <form wire:submit.prevent='saveConfiguration'>+ <div class="flex items-center gap-2">+ <h2>Proxy</h2>+ <x-forms.button type="submit">Save</x-forms.button>+ @if ($server->proxy->status === 'exited')+ <x-forms.button wire:click.prevent="switchProxy">Switch Proxy</x-forms.button>+ @endif+ <livewire:server.proxy.status :server="$server" />+ </div>+ <div class="pt-3 pb-4 ">Traefik v2</div>+ @if (+ $server->proxy->last_applied_settings &&+ $server->proxy->last_saved_settings !== $server->proxy->last_applied_settings)+ <div class="text-red-500 ">Configuration out of sync. Restart to get the new+ configs.+ </div>+ @endif+ @if ($server->id !== 0)+ <x-forms.input id="redirect_url" label="Default redirect"+ placeholder="https://coolify.io" />@endif- <livewire:server.proxy.status :server="$server" />- </div>- <div class="pt-3 pb-4 ">Traefik v2</div>- @if (- $server->proxy->last_applied_settings &&- $server->proxy->last_saved_settings !== $server->proxy->last_applied_settings)- <div class="text-red-500 ">Configuration out of sync. Restart to get the new configs.+ <div class="container w-full mx-auto">+ <livewire:activity-monitor :header="true" /></div>- @endif- @if ($server->id !== 0)- <x-forms.input id="redirect_url" label="Default redirect"- placeholder="https://coolify.io" />- @endif- <div class="container w-full mx-auto">- <livewire:activity-monitor :header="true" />- </div>- <div class="flex flex-col gap-2">- <x-forms.textarea label="Configuration file: traefik.conf" class="text-xs" noDirty- name="proxy_settings" wire:model.defer="proxy_settings" rows="30" />- <x-forms.button wire:click.prevent="resetProxy">- Reset configuration to default- </x-forms.button>- </div>- </form>+ <div class="flex flex-col gap-2">+ <x-forms.textarea label="Configuration file: traefik.conf" class="text-xs" noDirty+ name="proxy_settings" wire:model.defer="proxy_settings" rows="30" />+ <x-forms.button wire:click.prevent="resetProxy">+ Reset configuration to default+ </x-forms.button>+ </div>+ </form>+ @endif+ @else+ <div class="">Server is not validated. Validate first.</div>@endif- @endisset+ </div></div>@else<div>