Skip to content

Commit a849c25

Browse files
committed
improve: update process
1 parent 8b95b93 commit a849c25

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app/Actions/Server/UpdateCoolify.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function handle($manual_update = false)
2525
if (! $this->server) {
2626
return;
2727
}
28-
CleanupDocker::run($this->server, false);
28+
CleanupDocker::dispatch($this->server, false)->onQueue('high');
2929
$this->latestVersion = get_latest_version_of_coolify();
3030
$this->currentVersion = config('version');
3131
if (! $manual_update) {
@@ -48,6 +48,7 @@ public function handle($manual_update = false)
4848
private function update()
4949
{
5050
if (isDev()) {
51+
ray('Running in dev mode');
5152
remote_process([
5253
'sleep 10',
5354
], $this->server);

resources/views/livewire/upgrade.blade.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,26 @@ class="absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5
5858
<div class="relative w-auto pb-8">
5959
<p>Are you sure you would like to upgrade your instance to {{ $latestVersion }}?</p>
6060
<br />
61-
<p>You can review the changelogs <a class="font-bold underline"
61+
<p>You can review the changelogs <a class="font-bold underline dark:text-white"
6262
href="https://github.com/coollabsio/coolify/releases" target="_blank">here</a>.</p>
6363
<br />
6464
<p>If something goes wrong and you cannot upgrade your instance, You can check the following
65-
<a class="font-bold underline" href="https://coolify.io/docs/upgrade"
65+
<a class="font-bold underline dark:text-white" href="https://coolify.io/docs/upgrade"
6666
target="_blank">guide</a> on what to do.
6767
</p>
6868
@if ($showProgress)
6969
<div class="flex flex-col pt-4">
70-
<h4>Progress <x-loading /></h4>
70+
<h2>Progress <x-loading /></h2>
7171
<div x-html="currentStatus"></div>
7272
</div>
7373
@endif
7474
</div>
75-
<div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
75+
<div class="flex gap-4">
7676
@if (!$showProgress)
7777
<x-forms.button @click="modalOpen=false"
7878
class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
7979
</x-forms.button>
80+
<div class="flex-1"></div>
8081
<x-forms.button @click="confirmed" class="w-24" isHighlighted type="button">Continue
8182
</x-forms.button>
8283
@endif
@@ -98,6 +99,10 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
9899
this.$wire.$call('upgrade')
99100
this.upgrade();
100101
this.$wire.showProgress = true;
102+
window.addEventListener('beforeunload', (event) => {
103+
event.preventDefault();
104+
event.returnValue = '';
105+
});
101106
},
102107
revive() {
103108
if (checkHealthInterval) return true;

0 commit comments

Comments
 (0)