improve: update process
This commit is contained in:
parent
8b95b93c72
commit
a849c25672
@ -25,7 +25,7 @@ public function handle($manual_update = false)
|
||||
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 @@ public function handle($manual_update = false)
|
||||
private function update()
|
||||
{
|
||||
if (isDev()) {
|
||||
ray('Running in dev mode');
|
||||
remote_process([
|
||||
'sleep 10',
|
||||
], $this->server);
|
||||
|
@ -58,25 +58,26 @@ class="absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5
|
||||
<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 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
|
||||
this.$wire.$call('upgrade')
|
||||
this.upgrade();
|
||||
this.$wire.showProgress = true;
|
||||
window.addEventListener('beforeunload', (event) => {
|
||||
event.preventDefault();
|
||||
event.returnValue = '';
|
||||
});
|
||||
},
|
||||
revive() {
|
||||
if (checkHealthInterval) return true;
|
||||
|
Loading…
Reference in New Issue
Block a user