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 Bacsai25870dadd8b1
diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.phpindex c8b06bf4b5..f78ad8e23b 100644--- a/app/Http/Livewire/Project/Application/Deploy.php+++ b/app/Http/Livewire/Project/Application/Deploy.php@@ -49,9 +49,10 @@ class Deploy extends Componentdeployment_uuid: $this->deployment_uuid,force_rebuild: $force,);- return redirect()->route('project.application.deployments', [+ return redirect()->route('project.application.deployment', ['project_uuid' => $this->parameters['project_uuid'],'application_uuid' => $this->parameters['application_uuid'],+ 'deployment_uuid' => $this->deployment_uuid,'environment_name' => $this->parameters['environment_name'],]);}diff --git a/app/Http/Livewire/Project/Application/DeploymentLogs.php b/app/Http/Livewire/Project/Application/DeploymentLogs.phpindex cd13909efe..3780608dae 100644--- a/app/Http/Livewire/Project/Application/DeploymentLogs.php+++ b/app/Http/Livewire/Project/Application/DeploymentLogs.php@@ -16,6 +16,7 @@ class DeploymentLogs extends Componentpublic $deployment_uuid;public function polling(){+ $this->emit('deploymentFinished');if (is_null($this->activity) && isset($this->deployment_uuid)) {$this->activity = Activity::query()->where('properties->type', '=', ActivityTypes::DEPLOYMENT->value)diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Http/Livewire/Project/Application/DeploymentNavbar.phpindex 4bc91a0a1c..20809d2dbb 100644--- a/app/Http/Livewire/Project/Application/DeploymentNavbar.php+++ b/app/Http/Livewire/Project/Application/DeploymentNavbar.php@@ -12,6 +12,11 @@ class DeploymentNavbar extends Componentpublic Application $application;public $activity;public string $deployment_uuid;+ protected $listeners = ['deploymentFinished'];+ public function deploymentFinished()+ {+ $this->activity->refresh();+ }public function cancel(){try {diff --git a/app/Http/Livewire/Project/Application/Previews.php b/app/Http/Livewire/Project/Application/Previews.phpindex 48b6f74fd7..4c1e8ff10d 100644--- a/app/Http/Livewire/Project/Application/Previews.php+++ b/app/Http/Livewire/Project/Application/Previews.php@@ -59,9 +59,10 @@ class Previews extends Componentforce_rebuild: true,pull_request_id: $pull_request_id,);- return redirect()->route('project.application.deployments', [+ return redirect()->route('project.application.deployment', ['project_uuid' => $this->parameters['project_uuid'],'application_uuid' => $this->parameters['application_uuid'],+ 'deployment_uuid' => $this->deployment_uuid,'environment_name' => $this->parameters['environment_name'],]);} catch (\Throwable $th) {diff --git a/app/Http/Livewire/Project/Application/Rollback.php b/app/Http/Livewire/Project/Application/Rollback.phpindex 02a1949369..b1bbcec7ff 100644--- a/app/Http/Livewire/Project/Application/Rollback.php+++ b/app/Http/Livewire/Project/Application/Rollback.php@@ -29,9 +29,10 @@ class Rollback extends Componentforce_rebuild: false,);- return redirect()->route('project.application.deployments', [+ return redirect()->route('project.application.deployment', ['project_uuid' => $this->parameters['project_uuid'],'application_uuid' => $this->parameters['application_uuid'],+ 'deployment_uuid' => $deployment_uuid,'environment_name' => $this->parameters['environment_name'],]);}diff --git a/resources/views/livewire/project/application/deployment-logs.blade.php b/resources/views/livewire/project/application/deployment-logs.blade.phpindex 449868435f..90962c599b 100644--- a/resources/views/livewire/project/application/deployment-logs.blade.php+++ b/resources/views/livewire/project/application/deployment-logs.blade.php@@ -1,7 +1,15 @@<div>- <div class="pt-2 text-sm">Build status: {{ data_get($activity, 'properties.status') }}</div>+ <livewire:project.application.deployment-navbar :activity="$activity" :application="$application" :deployment_uuid="$deployment_uuid" />+ <h3 class="pb-0">Logs</h3>@if (data_get($activity, 'properties.status') === 'in_progress')- <livewire:project.application.deployment-navbar :activity="$activity" :application="$application" :deployment_uuid="$deployment_uuid" />+ <div class="pt-2 text-sm">Deployment is+ <span class="text-warning">{{ Str::headline(data_get($activity, 'properties.status')) }}</span>. Logs will+ be updated+ automatically.+ </div>+ @else+ <div class="pt-2 text-sm">Deployment is <span+ class="text-warning">{{ Str::headline(data_get($activity, 'properties.status')) }}</span>.</div>@endif<divclass="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 mt-4 text-xs text-white">diff --git a/resources/views/livewire/project/application/deployment-navbar.blade.php b/resources/views/livewire/project/application/deployment-navbar.blade.phpindex 02bb112a6b..0482c7d8bd 100644--- a/resources/views/livewire/project/application/deployment-navbar.blade.php+++ b/resources/views/livewire/project/application/deployment-navbar.blade.php@@ -1,3 +1,8 @@<div>- <x-forms.button wire:click.prevent="cancel">Cancel deployment</x-forms.button>+ <h3>Actions</h3>+ @if (data_get($activity, 'properties.status') === 'in_progress')+ <x-forms.button wire:click.prevent="cancel">Cancel deployment</x-forms.button>+ @else+ <x-forms.button disabled>Cancel deployment</x-forms.button>+ @endif</div>diff --git a/resources/views/livewire/project/application/deployments.blade.php b/resources/views/livewire/project/application/deployments.blade.phpindex 49e3e56562..53b1685cf2 100644--- a/resources/views/livewire/project/application/deployments.blade.php+++ b/resources/views/livewire/project/application/deployments.blade.php@@ -1,4 +1,4 @@- <div class="flex flex-col gap-2 pt-2 " wire:init='load_deployments'+ <div class="flex flex-col gap-2" wire:init='load_deployments'@if ($skip == 0) wire:poll.5000ms='reload_deployments' @endif><div><h3>Actions</h3>@@ -10,9 +10,6 @@@endif</div><h3>Deployments</h3>- <div wire:loading wire:target='load_deployments'>- <x-loading />- </div>@foreach ($deployments as $deployment)<a @class(['bg-coolgray-200 p-2 border-l border-dashed transition-colors hover:no-underline',@@ -52,7 +49,7 @@@endif<div class="flex flex-col" x-data="elapsedTime('{{ $deployment->deployment_uuid }}', '{{ $deployment->status }}', '{{ $deployment->created_at }}', '{{ $deployment->updated_at }}')">- <div>Finished <span x-text="measure_since_started()">0s</span> in <span class="font-bold text-white"+ <div>Finished <span x-text="measure_since_started()">0s</span> in <span class="font-bold"x-text="measure_finished_time()">0s</span></div></div></div>diff --git a/resources/views/project/application/deployment.blade.php b/resources/views/project/application/deployment.blade.phpindex cf8c0c27af..9fa7e4b8fd 100644--- a/resources/views/project/application/deployment.blade.php+++ b/resources/views/project/application/deployment.blade.php@@ -12,8 +12,5 @@</ul></div><x-applications.navbar :application="$application" />- {{-- @if (data_get($activity, 'properties.status') === 'in_progress' && (data_get($deployment, 'metadata.status') !== 'error' || data_get($deployment, 'metadata.status') !== 'finished'))- <livewire:project.application.deployment-cancel :activity="$activity" :application="$application" :deployment_uuid="$deployment_uuid" />- @endif --}}<livewire:project.application.deployment-logs :activity="$activity" :application="$application" :deployment_uuid="$deployment_uuid" /></x-layout>diff --git a/resources/views/project/application/deployments.blade.php b/resources/views/project/application/deployments.blade.phpindex 99a89fae79..9ee25c9a4b 100644--- a/resources/views/project/application/deployments.blade.php+++ b/resources/views/project/application/deployments.blade.php@@ -1,7 +1,7 @@<x-layout><h1 class="pb-0">Deployments</h1><div class="pb-10 text-sm breadcrumbs">- <ul>+ <ul>`<li><ahref="{{ route('project.show', ['project_uuid' => request()->route('project_uuid')]) }}">{{ $application->environment->project->name }}</a></li>