Add Docker update support via Watchtower integration#1330
Add Docker update support via Watchtower integration#1330Sebbeben wants to merge 1 commit intoPart-DB:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1330 +/- ##
============================================
- Coverage 56.45% 56.33% -0.12%
- Complexity 8323 8374 +51
============================================
Files 611 613 +2
Lines 26731 26894 +163
============================================
+ Hits 15091 15152 +61
- Misses 11640 11742 +102 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think it would be good to have something in the docker installation documentation on how to use setup that. |
Add web-based Docker container updates using Watchtower HTTP API. When configured with WATCHTOWER_API_URL and WATCHTOWER_API_TOKEN environment variables, administrators can trigger container updates from the Update Manager page. Features: - WatchtowerClient service for Watchtower HTTP API communication - Docker update progress page with animated Docker whale logo - Real-time step tracking: Trigger, Pull, Stop, Restart, Health Check, Verify - CSP-compatible progress bar using CSS classes - Translated UI strings via Stimulus values - Health endpoint polling to detect container restart - Watchtower setup documentation for Docker installations - WatchtowerClient made nullable for non-Docker installations - Unit tests for WatchtowerClient
2fb6514 to
3cdd085
Compare
Added Watchtower setup documentation to the Docker installation guide (
Also squashed all commits into a single clean commit and addressed the PHPStan issue (optional parameter before required ones). Note: The postgres CI failures are a pre-existing upstream issue (FK violation during fixture loading) — they also fail on master. |
Updated Docker Update Progress UIThe progress page has been redesigned to match the git update style: Changes in this update:
|

Summary
Extends the Update Manager to support Docker-based installations by integrating with Watchtower, a popular container update tool.
/update-manager/health) — unauthenticated JSON endpoint for post-restart detection (session is lost when container restarts)javascript:history.back()with proper navigation in error templateHow it works
Configuration
Docker users add a Watchtower sidecar to their
docker-compose.yml:And set environment variables for Part-DB:
If Watchtower is not configured, the Update Manager gracefully shows an informational message explaining how to enable Docker updates.
Files changed
src/Services/System/WatchtowerClient.phpsrc/Controller/UpdateManagerController.phpsrc/Services/System/UpdateChecker.phpsrc/Services/System/UpdateExecutor.phpsrc/Services/System/InstallationType.phpsrc/EventSubscriber/MaintenanceModeSubscriber.phpassets/controllers/docker_update_progress_controller.jstemplates/admin/update_manager/docker_progress.html.twigtemplates/admin/update_manager/index.html.twigtemplates/bundles/TwigBundle/Exception/error.html.twigtranslations/messages.en.xlfTest plan
Screenshots
Update Manager - Docker Installation
Update in Progress
Update Complete