Upgrade Hangar¶
Hangar follows semantic versioning. Read the changelog before you upgrade, and back up first (Backup and restore).
One container¶
docker pull ghcr.io/hangar-hub/hangar:latest
docker stop hangar && docker rm hangar
docker run -d --name hangar ... # the same options as before
A process in role all applies migrations when it starts.
Several processes¶
- Run the new version's
hangar admin migrateonce. Migrations only add to the schema within a major version, so processes of the previous version keep working while it runs. - Roll the
workerprocesses, then thewebprocesses. New processes report ready once the schema matches.
The Helm chart runs the migration in a pre-upgrade Job, or in an init container in each Pod with migrations.mode: initContainer (for Argo CD; see Run with Argo CD), and rolls the Deployments for you:
helm upgrade hangar oci://ghcr.io/hangar-hub/charts/hangar --namespace hangar -f values.yaml
Downgrades¶
Migrations do not run backwards. To go back to an earlier version, restore a backup made with it.