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 Bacsai8daad8f8b8ee
diff --git a/app/Models/GithubApp.php b/app/Models/GithubApp.phpindex ff7d30fac3..54e68aa635 100644--- a/app/Models/GithubApp.php+++ b/app/Models/GithubApp.php@@ -12,6 +12,10 @@ class GithubApp extends BaseModel'is_public' => 'boolean','type' => 'string'];+ protected $hidden = [+ 'client_secret',+ 'webhook_secret',+ ];protected static function booted(): void{static::deleting(function (GithubApp $github_app) {diff --git a/app/Models/GitlabApp.php b/app/Models/GitlabApp.phpindex 5e52dc00c8..dbac3414b5 100644--- a/app/Models/GitlabApp.php+++ b/app/Models/GitlabApp.php@@ -4,6 +4,10 @@ namespace App\Models;class GitlabApp extends BaseModel{+ protected $hidden = [+ 'webhook_token',+ 'app_secret',+ ];public function applications(){return $this->morphMany(Application::class, 'source');diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.phpindex c2954201e0..732157ccc1 100644--- a/app/Models/PrivateKey.php+++ b/app/Models/PrivateKey.php@@ -11,6 +11,9 @@ class PrivateKey extends BaseModel'private_key','team_id',];+ protected $hidden = [+ 'private_key',+ ];static public function ownedByCurrentTeam(){return PrivateKey::whereTeamId(session('currentTeam')->id);diff --git a/app/Models/Server.php b/app/Models/Server.phpindex d6d4b8e767..84596ea719 100644--- a/app/Models/Server.php+++ b/app/Models/Server.php@@ -74,9 +74,10 @@ class Server extends BaseModel{return $this->hasOne(ServerSetting::class);}- static public function ownedByCurrentTeam()+ static public function ownedByCurrentTeam(array $select = ['*']){- return Server::whereTeamId(session('currentTeam')->id);+ $selectArray = collect($select)->concat(['id']);+ return Server::whereTeamId(session('currentTeam')->id)->with('settings')->select($selectArray->all());}static public function validated()diff --git a/resources/css/app.css b/resources/css/app.cssindex 91012c5736..bc75a7fa5b 100644--- a/resources/css/app.css+++ b/resources/css/app.css@@ -15,7 +15,10 @@ body {@apply pl-24 pr-10 mx-auto max-w-screen-xl pt-4;}input {- @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full read-only:bg-coolgray-200/50 read-only:text-opacity-25 border-none;+ @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full read-only:bg-coolgray-200/50 read-only:text-opacity-25;+}+input && :not(input[type="checkbox"]) {+ @apply border-none;}input[type="checkbox"] {@apply toggle toggle-warning toggle-xs rounded;diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.phpindex c3c85d8283..78d07a602a 100644--- a/resources/views/components/forms/input.blade.php+++ b/resources/views/components/forms/input.blade.php@@ -15,20 +15,21 @@<div class="w-full">@if ($type === 'password')- <div class="w-full join" x-data>- <input class="join-item" @readonly($readonly) @disabled($disabled || $errors->isNotEmpty()) type={{ $type }}- id={{ $id }} name={{ $name }} value={{ $value }}- placeholder={{ $placeholder }}>- @if ($cannotPeakPassword)- <span x-on:click="changePasswordFieldType('{{ $id }}')" x-cloak- @class([- 'border-l-0 border-none rounded-r no-animation h-7 btn join-item btn-xs',- 'bg-coolgray-200/50 hover:bg-coolgray-200/50 text-opacity-25' =>- $disabled || $readonly,- 'bg-coolgray-200 hover:bg-coolgray-200' => !$disabled || !$readonly,- ])><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 icon"- viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"- stroke-linecap="round" stroke-linejoin="round">+ <div class="w-full rounded join" x-data>+ <input class="join-item" wire:model.defer={{ $id }} wire:dirty.class="input-warning"+ @readonly($readonly) @disabled($disabled || $errors->isNotEmpty()) type={{ $type }} id={{ $id }}+ name={{ $name }} @isset($value) value={{ $value }} @endisset+ @isset($placeholder) placeholder={{ $placeholder }} @endisset>+ @if (!$cannotPeakPassword)+ <span x-on:click="changePasswordFieldType" x-cloak @class([+ 'border-l-0 border-none rounded-r no-animation h-7 btn join-item btn-xs',+ 'bg-coolgray-200/50 hover:bg-coolgray-200/50 text-opacity-25' =>+ $disabled || $readonly,+ 'bg-coolgray-200 hover:bg-coolgray-200' => !$disabled || !$readonly,+ ])><svg+ xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 icon" viewBox="0 0 24 24"+ stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"+ stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><pathdiff --git a/resources/views/components/layout-simple.blade.php b/resources/views/components/layout-simple.blade.phpindex 54945a3754..6fe145a741 100644--- a/resources/views/components/layout-simple.blade.php+++ b/resources/views/components/layout-simple.blade.php@@ -27,13 +27,28 @@</main><x-version class="fixed left-2 bottom-1" /><script>- function changePasswordFieldType(id) {- console.log(id)- const input = document.getElementById(id);- if (input.type === 'password') {- input.type = 'text';- } else {- input.type = 'password';+ function changePasswordFieldType(event) {+ const element = event.target.parentElement.parentElement.children[0];+ if (element.nodeName === 'INPUT') {+ if (element.type === 'password') {+ element.type = 'text';+ } else {+ element.type = 'password';+ }+ }+ if (element.nodeName === 'DIV') {+ if (element.children[0].type === 'password') {+ element.children[0].type = 'text';+ } else {+ element.children[0].type = 'password';+ }+ }+ if (element.nodeName === 'svg') {+ if (element.parentElement.parentElement.children[0].type === 'password') {+ element.parentElement.parentElement.children[0].type = 'text';+ } else {+ element.parentElement.parentElement.children[0].type = 'password';+ }}}</script>diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.phpindex fade33a76d..ed4ff01310 100644--- a/resources/views/components/layout.blade.php+++ b/resources/views/components/layout.blade.php@@ -40,6 +40,24 @@let checkHealthInterval = null;let checkIfIamDeadInterval = null;+ function changePasswordFieldType(event) {+ const element = event.target.parentElement.parentElement.children[0];+ if (element.nodeName === 'INPUT') {+ if (element.type === 'password') {+ element.type = 'text';+ } else {+ element.type = 'password';+ }+ }+ if (element.nodeName === 'DIV') {+ if (element.children[0].type === 'password') {+ element.children[0].type = 'text';+ } else {+ element.children[0].type = 'password';+ }+ }+ }+function revive() {console.log('Checking server\'s health...')checkHealthInterval = setInterval(() => {diff --git a/resources/views/livewire/project/application/environment-variable/all.blade.php b/resources/views/livewire/project/application/environment-variable/all.blade.phpindex b6d89ad1cc..e55013ca0b 100644--- a/resources/views/livewire/project/application/environment-variable/all.blade.php+++ b/resources/views/livewire/project/application/environment-variable/all.blade.php@@ -8,7 +8,7 @@:env="$env" />@endforeach<div class="pt-2 pb-8">- <livewire:project.application.environment-varia /ble.add />+ <livewire:project.application.environment-variable.add /></div><div><h3>Preview Deployments</h3>diff --git a/resources/views/livewire/project/application/environment-variable/show.blade.php b/resources/views/livewire/project/application/environment-variable/show.blade.phpindex eda3afdeb1..30a172a88f 100644--- a/resources/views/livewire/project/application/environment-variable/show.blade.php+++ b/resources/views/livewire/project/application/environment-variable/show.blade.php@@ -1,7 +1,7 @@<div x-data="{ deleteEnvironment: false }"><form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row"><x-forms.input id="env.key" label="Name" />- <x-forms.input id="env.value" label="Value" />+ <x-forms.input type="password" id="env.value" label="Value" /><x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" /><div class="flex gap-2"><x-forms.button type="submit">diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex d6e1b2aadc..565761852d 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -7,7 +7,6 @@<div wire:loading wire:target="checkProxySettingsInSync"><x-loading /></div>-@isset($proxy_settings)@if ($selectedProxy->value === 'TRAEFIK_V2')<form wire:submit.prevent='saveConfiguration({{ $server }})'>diff --git a/routes/web.php b/routes/web.phpindex 0c8a9c9ee6..ffa7052248 100644--- a/routes/web.php+++ b/routes/web.php@@ -70,17 +70,17 @@ 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()->whereUuid(request()->server_uuid)->firstOrFail(),+ 'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user'])->whereUuid(request()->server_uuid)->firstOrFail(),]))->name('server.show');Route::get('/server/{server_uuid}/proxy', fn () => view('server.proxy', [- 'server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail(),+ 'server' => Server::ownedByCurrentTeam(['name', 'extra_attributes'])->whereUuid(request()->server_uuid)->firstOrFail(),]))->name('server.proxy');Route::get('/server/{server_uuid}/private-key', fn () => view('server.private-key', ['server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail(),'privateKeys' => PrivateKey::ownedByCurrentTeam()->get(),]))->name('server.private-key');Route::get('/server/{server_uuid}/destinations', fn () => view('server.destinations', [- 'server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail()+ 'server' => Server::ownedByCurrentTeam(['name'])->whereUuid(request()->server_uuid)->firstOrFail()]))->name('server.destinations');});