Skip to content

Upgrading

Terminal window
# DB snapshot (WAL-safe via VACUUM INTO)
sudo simpledeploy db backup --output /var/lib/simpledeploy/backups/pre-upgrade.db
# Compose files
sudo tar -czf ~/apps-pre-upgrade.tgz /etc/simpledeploy/apps
Terminal window
sudo apt update
sudo apt upgrade simpledeploy

systemd restarts the service automatically when the package replaces the binary.

  1. Binary boots, opens the SQLite file.
  2. Embedded migrations run in order. Any new schema is applied transactionally.
  3. Caddy reloads with the existing route config.
  4. The reconciler re-scans apps_dir and reconciles desired state.

App containers stay running across the upgrade. The dashboard is briefly unavailable (a few seconds).

Read the CHANGELOG before any minor version bump. Compose label renames or config field changes will be called out there with migration steps.

A top-level jobs entry that uses extends with file: now looks up the target in that file’s jobs: section, not services: (matches current docker compose). If such an app fails to load after upgrading, move the base definition under jobs: in the referenced file:

common/base.yml
jobs:
base:
image: alpine

If a new version misbehaves:

  1. Stop the service:

    Terminal window
    sudo systemctl stop simpledeploy
  2. Restore the previous binary:

    Terminal window
    # apt
    sudo apt install simpledeploy=<previous-version>
    # binary
    sudo cp /path/to/old/simpledeploy /usr/local/bin/
  3. Restore the DB snapshot:

    Terminal window
    sudo cp /var/lib/simpledeploy/backups/pre-upgrade.db /var/lib/simpledeploy/simpledeploy.db
  4. 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.