Upgrading
Quick backup
Section titled “Quick backup”# DB snapshot (WAL-safe via VACUUM INTO)sudo simpledeploy db backup --output /var/lib/simpledeploy/backups/pre-upgrade.db
# Compose filessudo tar -czf ~/apps-pre-upgrade.tgz /etc/simpledeploy/appsUpgrade by install method
Section titled “Upgrade by install method”sudo apt updatesudo apt upgrade simpledeploysystemd restarts the service automatically when the package replaces the binary.
cd /etc/simpledeploysudo docker compose pullsudo docker compose up -dThe container restarts with the new image. Schema migrations run on start.
brew updatebrew upgrade simpledeploy-
Download the new tarball:
Terminal window curl -L https://github.com/vazra/simpledeploy/releases/latest/download/simpledeploy_linux_amd64.tar.gz | tar xz -
Stop, replace, start:
Terminal window sudo systemctl stop simpledeploysudo mv simpledeploy /usr/local/bin/sudo systemctl start simpledeploy
cd simpledeploygit pullmake buildsudo systemctl stop simpledeploysudo cp bin/simpledeploy /usr/local/bin/sudo systemctl start simpledeployWhat happens on first start
Section titled “What happens on first start”- Binary boots, opens the SQLite file.
- Embedded migrations run in order. Any new schema is applied transactionally.
- Caddy reloads with the existing route config.
- The reconciler re-scans
apps_dirand reconciles desired state.
App containers stay running across the upgrade. The dashboard is briefly unavailable (a few seconds).
Breaking changes
Section titled “Breaking changes”Read the CHANGELOG before any minor version bump. Compose label renames or config field changes will be called out there with migration steps.
Rollback
Section titled “Rollback”If a new version misbehaves:
-
Stop the service:
Terminal window sudo systemctl stop simpledeploy -
Restore the previous binary:
Terminal window # aptsudo apt install simpledeploy=<previous-version># binarysudo cp /path/to/old/simpledeploy /usr/local/bin/ -
Restore the DB snapshot:
Terminal window sudo cp /var/lib/simpledeploy/backups/pre-upgrade.db /var/lib/simpledeploy/simpledeploy.db -
Start:
Terminal window sudo systemctl start simpledeploy
Restoring the DB undoes any new-schema rows the new version wrote. App containers themselves are unaffected by the rollback.