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
updates
Andras Bacsai7bcbfc13b078
diff --git a/app/Http/Livewire/PrivateKey/Change.php b/app/Http/Livewire/PrivateKey/Change.phpindex 28b18494e8..568ed74869 100644--- a/app/Http/Livewire/PrivateKey/Change.php+++ b/app/Http/Livewire/PrivateKey/Change.php@@ -22,9 +22,12 @@ class Change extends Componentpublic function delete(){try {- PrivateKey::where('uuid', $this->private_key_uuid)->delete();- session('currentTeam')->privateKeys = PrivateKey::where('team_id', session('currentTeam')->id)->get();- redirect()->route('dashboard');+ if ($this->private_key->isEmpty()) {+ $this->private_key->delete();+ session('currentTeam')->privateKeys = PrivateKey::where('team_id', session('currentTeam')->id)->get();+ return redirect()->route('private-key.all');+ }+ $this->emit('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.');} catch (\Exception $e) {return general_error_handler(err: $e, that: $this);}diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.phpindex 39aff9b95d..f1435ea28d 100644--- a/app/Http/Livewire/Server/Form.php+++ b/app/Http/Livewire/Server/Form.php@@ -65,7 +65,7 @@ class Form extends Componentreturn;}$this->server->delete();- redirect()->route('dashboard');+ redirect()->route('server.all');}public function submit(){diff --git a/app/Http/Livewire/Source/Github/Change.php b/app/Http/Livewire/Source/Github/Change.phpindex b2bb9f75a0..7908b179ca 100644--- a/app/Http/Livewire/Source/Github/Change.php+++ b/app/Http/Livewire/Source/Github/Change.php@@ -57,7 +57,7 @@ class Change extends Component{try {$this->github_app->delete();- redirect()->route('dashboard');+ redirect()->route('source.all');} catch (\Exception $e) {return general_error_handler(err: $e, that: $this);}diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.phpindex 39a6a8c8cc..337e1555a4 100644--- a/app/Models/PrivateKey.php+++ b/app/Models/PrivateKey.php@@ -16,9 +16,27 @@ class PrivateKey extends BaseModel$selectArray = collect($select)->concat(['id']);return PrivateKey::whereTeamId(session('currentTeam')->id)->where('id', '>', 0)->select($selectArray->all());}-+ public function applications()+ {+ return $this->hasMany(Application::class);+ }+ public function githubApps()+ {+ return $this->hasMany(GithubApp::class);+ }+ public function gitlabApps()+ {+ return $this->hasMany(GitlabApp::class);+ }public function servers(){return $this->hasMany(Server::class);}+ public function isEmpty()+ {+ if ($this->servers()->count() === 0 && $this->applications()->count() === 0 && $this->githubApps()->count() === 0 && $this->gitlabApps()->count() === 0) {+ return true;+ }+ return false;+ }}diff --git a/config/toaster.php b/config/toaster.phpindex 8059272105..4dd1244b11 100644--- a/config/toaster.php+++ b/config/toaster.php@@ -30,7 +30,7 @@ return [** Minimum: 3000 (in milliseconds)*/- 'duration' => 3000,+ 'duration' => 5000,/*** The horizontal position of each toast.diff --git a/config/version.php b/config/version.phpindex b6e6dc283f..b71f4008dd 100644--- a/config/version.php+++ b/config/version.php@@ -1,3 +1,3 @@<?php-return '4.0.0-nightly.24';+return '4.0.0-nightly.25';diff --git a/resources/js/components/MagicBar.vue b/resources/js/components/MagicBar.vueindex 58b485e407..7e18810f39 100644--- a/resources/js/components/MagicBar.vue+++ b/resources/js/components/MagicBar.vue@@ -326,7 +326,7 @@ const magicActions = [{{id: 11,name: 'Goto: Private Keys',- tags: 'destination,docker,network,new,create',+ tags: 'destination,docker,network,new,create,ssh,private,key',icon: 'goto',sequence: ['main', 'redirect']},diff --git a/resources/views/livewire/project/application/danger.blade.php b/resources/views/livewire/project/application/danger.blade.phpindex 79b9caefd7..264573026e 100644--- a/resources/views/livewire/project/application/danger.blade.php+++ b/resources/views/livewire/project/application/danger.blade.php@@ -1,9 +1,9 @@<div x-data="{ deleteApplication: false }"><x-naked-modal show="deleteApplication" title="Delete Application"message='This application will be deleted. It is not reversible. <br>Please think again.' />- <h2>Danger Zone</h2>+ <h3>Danger Zone</h3><div class="">Woah. I hope you know what are you doing.</div>- <h3 class="pt-4">Delete Application</h3>+ <h4 class="pt-4">Delete Application</h4><div class="pb-4">This will stop your containers, delete all related data, etc. Beware! There is no comingback!</div>diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.phpindex 1ac087e2ae..403c5f1eba 100644--- a/resources/views/livewire/server/form.blade.php+++ b/resources/views/livewire/server/form.blade.php@@ -5,11 +5,7 @@<div class="flex gap-2"><h2>General</h2><x-forms.button type="submit">Save</x-forms.button>- @if ($server->id !== 0 || isDev())- <x-forms.button x-on:click.prevent="deleteServer = true">- Delete- </x-forms.button>- @endif+</div><div class="flex flex-col gap-2 "><div class="flex flex-col w-full gap-2 lg:flex-row">@@ -72,4 +68,15 @@</div>@endisset</form>+ <h3>Danger Zone</h3>+ <div class="">Woah. I hope you know what are you doing.</div>+ <h4 class="pt-4">Delete Server</h4>+ <div class="pb-4">This will remove this server from Coolify. Beware! There is no coming+ back!+ </div>+ @if ($server->id !== 0 || isDev())+ <x-forms.button x-on:click.prevent="deleteServer = true">+ Delete+ </x-forms.button>+ @endif</div>diff --git a/versions.json b/versions.jsonindex b1f7e7129b..046a890103 100644--- a/versions.json+++ b/versions.json@@ -4,7 +4,7 @@"version": "3.12.32"},"v4": {- "version": "4.0.0-nightly.24"+ "version": "4.0.0-nightly.25"}}}\ No newline at end of file