Skip to content

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.

improve: update process

Andras Bacsaia849c256722a
diff --git a/app/Actions/Server/UpdateCoolify.php b/app/Actions/Server/UpdateCoolify.php
index 0e97d2aed3..a945670d42 100644
--- a/app/Actions/Server/UpdateCoolify.php
+++ b/app/Actions/Server/UpdateCoolify.php
@@ -25,7 +25,7 @@ class UpdateCoolify
if (! $this->server) {
return;
}
- CleanupDocker::run($this->server, false);
+ CleanupDocker::dispatch($this->server, false)->onQueue('high');
$this->latestVersion = get_latest_version_of_coolify();
$this->currentVersion = config('version');
if (! $manual_update) {
@@ -48,6 +48,7 @@ class UpdateCoolify
private function update()
{
if (isDev()) {
+ ray('Running in dev mode');
remote_process([
'sleep 10',
], $this->server);
diff --git a/resources/views/livewire/upgrade.blade.php b/resources/views/livewire/upgrade.blade.php
index d10ef8b452..59b3d718d7 100644
--- a/resources/views/livewire/upgrade.blade.php
+++ b/resources/views/livewire/upgrade.blade.php
@@ -58,25 +58,26 @@
<div class="relative w-auto pb-8">
<p>Are you sure you would like to upgrade your instance to {{ $latestVersion }}?</p>
<br />
- <p>You can review the changelogs <a class="font-bold underline"
+ <p>You can review the changelogs <a class="font-bold underline dark:text-white"
href="https://github.com/coollabsio/coolify/releases" target="_blank">here</a>.</p>
<br />
<p>If something goes wrong and you cannot upgrade your instance, You can check the following
- <a class="font-bold underline" href="https://coolify.io/docs/upgrade"
+ <a class="font-bold underline dark:text-white" href="https://coolify.io/docs/upgrade"
target="_blank">guide</a> on what to do.
</p>
@if ($showProgress)
<div class="flex flex-col pt-4">
- <h4>Progress <x-loading /></h4>
+ <h2>Progress <x-loading /></h2>
<div x-html="currentStatus"></div>
</div>
@endif
</div>
- <div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
+ <div class="flex gap-4">
@if (!$showProgress)
<x-forms.button @click="modalOpen=false"
class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
</x-forms.button>
+ <div class="flex-1"></div>
<x-forms.button @click="confirmed" class="w-24" isHighlighted type="button">Continue
</x-forms.button>
@endif
@@ -98,6 +99,10 @@
this.$wire.$call('upgrade')
this.upgrade();
this.$wire.showProgress = true;
+ window.addEventListener('beforeunload', (event) => {
+ event.preventDefault();
+ event.returnValue = '';
+ });
},
revive() {
if (checkHealthInterval) return true;