Updating
Pull new GHCR images and recreate the api and app containers. Migrations run automatically on the api’s next boot — no manual migrate:db needed.
The api and app images are private on GHCR, so the user running docker compose pull must be logged in to ghcr.io first — see Registry login. The systemd timer below runs as root, so log in as root if you plan to use it.
Release channel
Section titled “Release channel”Both api and app pull the latest tag of whichever channel SANCHO_CHANNEL selects (defaults to prod, i.e. the master branch). Set SANCHO_CHANNEL=dev to follow develop-branch pre-releases.
Upgrade:
docker compose pulldocker compose up -dManual update
Section titled “Manual update”git pulldocker compose pulldocker compose up -dDaily automatic updates (systemd)
Section titled “Daily automatic updates (systemd)”Two unit files ship next to the compose: sancho-update.service and sancho-update.timer. They run docker compose pull api app + docker compose up -d api app + docker image prune -f every day at 04:00 UTC, touching only the api and app containers. The database, RabbitMQ, Redis, and Caddy are left alone.
Install once per host:
-
Edit the
WorkingDirectoryinsancho-update.serviceto the absolute path of thedeployment/docker-composedirectory (default:/opt/sancho/...):Terminal window sudo $EDITOR sancho-update.service -
Copy both units into
/etc/systemd/system/:Terminal window sudo cp sancho-update.service sancho-update.timer /etc/systemd/system/ -
Reload systemd and enable the timer (this also starts it):
Terminal window sudo systemctl daemon-reloadsudo systemctl enable --now sancho-update.timer
Inspect:
systemctl status sancho-update.timer # when it fires nextsystemctl list-timers sancho-update.timer # last / next runjournalctl -u sancho-update.service # output of previous runsTrigger an out-of-cycle run:
sudo systemctl start sancho-update.serviceDisable:
sudo systemctl disable --now sancho-update.timer