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
lets see now
Andras Bacsai2073b8949be9
diff --git a/app/Http/Livewire/Project/Service/ComposeModal.php b/app/Http/Livewire/Project/Service/ComposeModal.phpindex 4203f45070..bd5a7c0413 100644--- a/app/Http/Livewire/Project/Service/ComposeModal.php+++ b/app/Http/Livewire/Project/Service/ComposeModal.php@@ -2,18 +2,22 @@namespace App\Http\Livewire\Project\Service;+use App\Models\Service;use Livewire\Component;class ComposeModal extends Component{- public ?string $raw = null;- public ?string $actual = null;+ public Service $service;+ protected $rules = [+ 'service.docker_compose_raw' => 'required',+ 'service.docker_compose' => 'required',+ ];public function render(){return view('livewire.project.service.compose-modal');}public function submit() {$this->emit('warning', "Saving new docker compose...");- $this->emit('saveCompose', $this->raw);+ $this->emit('saveCompose', $this->service->docker_compose_raw);}}diff --git a/resources/views/livewire/project/service/compose-modal.blade.php b/resources/views/livewire/project/service/compose-modal.blade.phpindex d3c16dfd4d..d03ef2cbdd 100644--- a/resources/views/livewire/project/service/compose-modal.blade.php+++ b/resources/views/livewire/project/service/compose-modal.blade.php@@ -1,4 +1,4 @@-<dialog id="composeModal" class="modal" x-data="{ raw: true }">+<dialog id="composeModal" class="modal" x-data="{ raw: true }" wire:ignore.self><form method="dialog" class="flex flex-col gap-2 rounded max-w-7xl modal-box" wire:submit.prevent='submit'><div class="flex items-end gap-2"><h1>Docker Compose</h1>@@ -13,11 +13,11 @@<div>Volume names are updated upon save. The service UUID will be added as a prefix to all volumes, to prevent name collision. <br>To see the actual volume names, check the Deployable Compose file, or go to Storage menu.</div><div x-cloak x-show="raw">- <x-forms.textarea rows="20" id="raw">+ <x-forms.textarea rows="20" id="service.docker_compose_raw"></x-forms.textarea></div><div x-cloak x-show="raw === false">- <x-forms.textarea rows="20" readonly id="actual">+ <x-forms.textarea rows="20" readonly id="service.docker_compose"></x-forms.textarea></div><x-forms.button onclick="composeModal.close()" type="submit">diff --git a/resources/views/livewire/project/service/index.blade.php b/resources/views/livewire/project/service/index.blade.phpindex 5a77620b61..302f4f2d7c 100644--- a/resources/views/livewire/project/service/index.blade.php+++ b/resources/views/livewire/project/service/index.blade.php@@ -1,7 +1,7 @@-<div x-data="{ raw: true, activeTab: window.location.hash ? window.location.hash.substring(1) : 'service-stack' }" x-init="$wire.checkStatus" wire:poll.10000ms="checkStatus" wire:ignore.self>+<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'service-stack' }" x-init="$wire.checkStatus"><livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />- <livewire:project.service.compose-modal :raw="$service->docker_compose_raw" :actual="$service->docker_compose" />- <div class="flex h-full pt-6">+ <livewire:project.service.compose-modal :service="$service" />+ <div class="flex h-full pt-6" wire:poll.10000ms="checkStatus"><div class="flex flex-col items-start gap-4 min-w-fit"><a target="_blank" href="{{ $service->documentation() }}">Documentation <x-external-link /></a><a :class="activeTab === 'service-stack' && 'text-white'"