mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-24 04:07:16 +00:00
fix: make update system Docker-aware and prevent container modifications
- Added Docker environment detection to prevent in-place updates - Show Docker-specific update instructions in UI instead of update button - Provide proper docker pull commands for Docker users - Updated README with web-based update documentation - Ensure Docker container immutability is maintained
This commit is contained in:
@@ -878,7 +878,33 @@ PulseApp.ui.settings = (() => {
|
||||
.replace(/^/, '<p class="mb-2">')
|
||||
.replace(/$/, '</p>');
|
||||
|
||||
latestVersionInfo.innerHTML = `<span class="text-green-600 dark:text-green-400">Update available!</span>`;
|
||||
// Handle Docker deployments differently
|
||||
if (updateInfo.isDocker) {
|
||||
latestVersionInfo.innerHTML = `<span class="text-green-600 dark:text-green-400">Update available! (Docker deployment detected)</span>`;
|
||||
|
||||
// Replace the apply button with Docker instructions
|
||||
const applyButton = document.getElementById('apply-update-button');
|
||||
const buttonContainer = applyButton.parentElement;
|
||||
|
||||
buttonContainer.innerHTML = `
|
||||
<div class="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-3">
|
||||
<p class="text-sm font-medium text-blue-800 dark:text-blue-200 mb-2">Docker Update Instructions:</p>
|
||||
<ol class="text-sm text-gray-700 dark:text-gray-300 list-decimal list-inside space-y-1">
|
||||
<li>Pull the latest image: <code class="bg-gray-100 dark:bg-gray-800 px-1 rounded">docker pull rcourtman/pulse:latest</code></li>
|
||||
<li>Recreate your container with the new image</li>
|
||||
<li>Or update your docker-compose.yml to version <code class="bg-gray-100 dark:bg-gray-800 px-1 rounded">${updateInfo.latestVersion}</code></li>
|
||||
</ol>
|
||||
<a href="${updateInfo.releaseUrl}" target="_blank" class="inline-flex items-center gap-1 mt-2 text-sm text-blue-600 dark:text-blue-400 hover:underline">
|
||||
View release on GitHub
|
||||
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
latestVersionInfo.innerHTML = `<span class="text-green-600 dark:text-green-400">Update available!</span>`;
|
||||
}
|
||||
} else {
|
||||
updateDetails.classList.add('hidden');
|
||||
latestVersionInfo.innerHTML = `<span class="text-gray-600 dark:text-gray-400">You are running the latest version</span>`;
|
||||
|
||||
Reference in New Issue
Block a user