* chore(version): update coolify-realtime to version 1.0.9 in docker-compose and versions files * feat(migration): add is_sentinel_enabled column to server_settings with default true * fix(migration): update default value handling for is_sentinel_enabled column in server_settings * feat(seeder): dispatch StartProxy action for each server in ProductionSeeder * feat(seeder): add CheckAndStartSentinelJob dispatch for each server in ProductionSeeder * fix(seeder): conditionally dispatch CheckAndStartSentinelJob based on server's sentinel status * feat(seeder): conditionally dispatch StartProxy action based on proxy check result * refactor(ui): terminal * refactor(ui): remove terminal header from execute-container-command view * refactor(ui): remove unnecessary padding from deployment, backup, and logs sections * fix(service): disable healthcheck logging for Gotenberg (#6005) * fix(service): Joplin volume name (#5930) * chore(version): update coolify version to 4.0.0-beta.420 and nightly version to 4.0.0-beta.421 * fix(server): update sentinelUpdatedAt assignment to use server's sentinel_updated_at property * feat(service): update Changedetection template (#5937) * chore(service): changedetection remove unused code * fix(service): audiobookshelf healthcheck command (#5993) * refactor(service): update Hoarder to their new name karakeep (#5964) * fix(service): downgrade Evolution API phone version (#5977) * feat(service): add Miniflux service (#5843) * refactor(service): karakeep naming and formatting * refactor(service): improve miniflux - improve DB url - add depends_on - formatting, naming & order * feat(service): add Pingvin Share service (#5969) * fix(service): pingvinshare-with-clamav - add platform to make clamav work - formatting * feat(auth): Add Discord OAuth Provider (#5552) * feat(auth): Add Clerk OAuth Provider (#5553) * feat(auth): add Zitadel OAuth Provider (#5490) * Update composer.lock * fix(ssh): scp requires square brackets for ipv6 (#6001) * refactor(core): rename API rate limit ENV * refactor(ui): simplify container selection form in execute-container-command view * chore(service): Update Evolution API image to the official one (#6031) * chore(versions): bump coolify versions to v4.0.0-beta.420 and v4.0.0-beta.421 * fix(github): changing github app breaks the webhook. it does not anymore * feat(service): enhance service status handling and UI updates * fix(parser): improve FQDN generation and update environment variable handling * fix(ui): enhance status refresh buttons with loading indicators * fix(ui): update confirmation button text for stopping database and service * fix(routes): update middleware for deploy route to use 'api.ability:deploy' * fix(ui): refine API token creation form and update helper text for clarity * fix(ui): adjust layout of deployments section for improved alignment * chore(dependencies): update composer dependencies to latest versions including resend-laravel to ^0.19.0 and aws-sdk-php to 3.347.0 * refactor(email): streamline SMTP and resend settings logic for improved clarity * fix(ui): adjust project grid layout and refine server border styling for better visibility * fix(ui): update border styling for consistency across components and enhance loading indicators * feat(cleanup): add functionality to delete teams with no members or servers in CleanupStuckedResources command * refactor(invitation): rename methods for consistency and enhance invitation deletion logic * refactor(user): streamline user deletion process and enhance team management logic * fix(ui): add padding to section headers in settings views for improved spacing * fix(ui): reduce gap between input fields in email settings for better alignment * fix(docker): conditionally enable gzip compression in Traefik labels based on configuration * fix(parser): enable gzip compression conditionally for Pocketbase images and streamline service creation logic * fix(ui): update padding for trademarks policy and enhance spacing in advanced settings section * feat(ui): add heart icon and enhance popup messaging for sponsorship support * feat(settings): add sponsorship popup toggle and corresponding database migration * fix(ui): correct closing tag for sponsorship link in layout popups * fix(ui): refine wording in sponsorship donation prompt in layout popups * fix(ui): update navbar icon color and enhance popup layout for sponsorship support * Update resources/views/livewire/project/shared/health-checks.blade.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app/Livewire/Subscription/Index.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(ui): add target="_blank" to sponsorship links in layout popups for improved user experience * fix(models): refine comment wording in User model for clarity on user deletion criteria * Update app/Providers/RouteServiceProvider.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(models): improve user deletion logic in User model to handle team member roles and prevent deletion if user is alone in root team * fix(ui): update wording in sponsorship prompt for clarity and engagement --------- Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Co-authored-by: Khiet Tam Nguyen <86177399+nktnet1@users.noreply.github.com> Co-authored-by: Carsten <BanditsBacon@users.noreply.github.com> Co-authored-by: Alberto Rizzi <48057685+albertorizzi@users.noreply.github.com> Co-authored-by: Jonas Klesen <deklesen@gmail.com> Co-authored-by: Stew Night. <22344601+stewnight@users.noreply.github.com> Co-authored-by: Jeffer Marcelino <jeffersunde72@gmail.com> Co-authored-by: Lucas Eduardo <lucas59356@gmail.com> Co-authored-by: CrazyTim71 <118295691+CrazyTim71@users.noreply.github.com> Co-authored-by: Yassir Elmarissi <yassir.elmarissi@hm.edu> Co-authored-by: Hauke Schnau <hauke@schnau-lilienthal.de> Co-authored-by: Darren Sisson <74752850+djsisson@users.noreply.github.com> Co-authored-by: Alkesh Das <67038642+smad-bro@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
148 lines
8.6 KiB
PHP
148 lines
8.6 KiB
PHP
<div @if ($isUpgradeAvailable) title="New version available" @else title="No upgrade available" @endif
|
|
x-init="$wire.checkUpdate" x-data="upgradeModal">
|
|
@if ($isUpgradeAvailable)
|
|
<div :class="{ 'z-40': modalOpen }" class="relative w-auto h-auto">
|
|
<button class="menu-item" @click="modalOpen=true" x-show="showProgress">
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
class="w-6 h-6 text-pink-500 transition-colors hover:text-pink-300 lds-heart" 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="M19.5 13.572l-7.5 7.428l-7.5 -7.428m0 0a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572" />
|
|
</svg>
|
|
In progress
|
|
</button>
|
|
<button class="menu-item" @click="modalOpen=true" x-show="!showProgress">
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
class="w-6 h-6 text-pink-500 transition-colors hover:text-pink-300" 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="M9 12h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v3h-6v-3z" />
|
|
<path d="M9 21h6" />
|
|
<path d="M9 18h6" />
|
|
</svg>
|
|
Upgrade
|
|
</button>
|
|
<template x-teleport="body">
|
|
<div x-show="modalOpen"
|
|
class="fixed top-0 lg:pt-10 left-0 z-99 flex items-start justify-center w-screen h-screen" x-cloak>
|
|
<div x-show="modalOpen" x-transition:enter="ease-out duration-100"
|
|
x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
|
|
x-transition:leave="ease-in duration-100" x-transition:leave-start="opacity-100"
|
|
x-transition:leave-end="opacity-0"
|
|
class="absolute inset-0 w-full h-full bg-black/20 backdrop-blur-xs"></div>
|
|
<div x-show="modalOpen" x-trap.inert.noscroll="modalOpen" x-transition:enter="ease-out duration-100"
|
|
x-transition:enter-start="opacity-0 -translate-y-2 sm:scale-95"
|
|
x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
|
|
x-transition:leave="ease-in duration-100"
|
|
x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
|
|
x-transition:leave-end="opacity-0 -translate-y-2 sm:scale-95"
|
|
class="relative w-full py-6 border rounded-sm min-w-full lg:min-w-[36rem] max-w-fit bg-neutral-100 border-neutral-400 dark:bg-base px-7 dark:border-coolgray-300">
|
|
<div class="flex items-center justify-between pb-3">
|
|
<h3 class="text-lg font-semibold">Upgrade confirmation</h3>
|
|
<button x-show="!showProgress" @click="modalOpen=false"
|
|
class="absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50">
|
|
<svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="relative w-auto pb-8">
|
|
<p>Are you sure you would like to upgrade your instance to {{ $latestVersion }}?</p>
|
|
<br />
|
|
|
|
<div
|
|
class="p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800">
|
|
<p class="font-medium">Warning: Any deployments running during the update process will
|
|
fail. Please ensure no deployments are in progress on any server before continuing.
|
|
</p>
|
|
</div>
|
|
<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 dark:text-white" href="https://coolify.io/docs/upgrade"
|
|
target="_blank">guide</a> on what to do.
|
|
</p>
|
|
<div class="flex flex-col pt-4" x-show="showProgress">
|
|
<h2>Progress <x-loading /></h2>
|
|
<div x-html="currentStatus"></div>
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-4" x-show="!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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('alpine:init', () => {
|
|
Alpine.data('upgradeModal', () => ({
|
|
modalOpen: false,
|
|
showProgress: false,
|
|
currentStatus: '',
|
|
confirmed() {
|
|
this.showProgress = true;
|
|
this.$wire.$call('upgrade')
|
|
this.upgrade();
|
|
window.addEventListener('beforeunload', (event) => {
|
|
event.preventDefault();
|
|
event.returnValue = '';
|
|
});
|
|
},
|
|
revive() {
|
|
if (checkHealthInterval) return true;
|
|
console.log('Checking server\'s health...')
|
|
checkHealthInterval = setInterval(() => {
|
|
fetch('/api/health')
|
|
.then(response => {
|
|
if (response.ok) {
|
|
this.currentStatus =
|
|
'Coolify is back online. Reloading this page (you can manually reload if its not done automatically)...';
|
|
if (checkHealthInterval) clearInterval(
|
|
checkHealthInterval);
|
|
setTimeout(() => {
|
|
window.location.reload();
|
|
}, 5000)
|
|
} else {
|
|
this.currentStatus =
|
|
"Waiting for Coolify to come back from the dead..."
|
|
}
|
|
})
|
|
}, 2000);
|
|
},
|
|
upgrade() {
|
|
if (checkIfIamDeadInterval || this.$wire.showProgress) return true;
|
|
this.currentStatus = 'Pulling new images and updating Coolify.';
|
|
checkIfIamDeadInterval = setInterval(() => {
|
|
fetch('/api/health')
|
|
.then(response => {
|
|
if (response.ok) {
|
|
this.currentStatus = "Waiting for the update process..."
|
|
} else {
|
|
this.currentStatus =
|
|
"Update done, restarting Coolify & waiting until it is revived!"
|
|
if (checkIfIamDeadInterval) clearInterval(
|
|
checkIfIamDeadInterval);
|
|
this.revive();
|
|
}
|
|
})
|
|
}, 2000);
|
|
}
|
|
|
|
}))
|
|
})
|
|
</script>
|