Upgrade
This runbook is for the operator of a Docker Compose deployment. Run every command in the directory of the Vellum source, which holds docker-compose.yml.
Vellum has no tagged release yet. A version is a commit of the repository. The data format can change between commits until the first release.
What an upgrade does
Section titled “What an upgrade does”- You build a new image from newer source.
- When the new image starts, Vellum applies the database migrations of every module before it accepts requests. The value
Database__MigrateOnStartupcontrols this. Its default istrue. - Migrations add tables and columns. They do not remove data. Vellum has no migration that goes back to an older version.
- When more than one instance starts at the same time, one instance applies the migrations and the others wait.
Because no migration goes back, the backup that you make before the upgrade is the only way back.
Before the upgrade
Section titled “Before the upgrade”-
Make a backup: Back up and restore. Do not continue without the dump and the master key.
-
Write down the commit that runs now.
Terminal window git rev-parse HEAD -
Read the changes between that commit and the new one. Look for a new value in Bootstrap environment and for a note about the data format.
Upgrade
Section titled “Upgrade”-
Get the new source.
Terminal window git pull -
Build the image and replace the container.
--waitreturns when the health check reportshealthy. The database container and both volumes stay.Terminal window docker compose up -d --build --waitPeople who use the app get errors while the container restarts. Their sessions stay valid.
Check the result
Section titled “Check the result”-
The health endpoint answers
200.Terminal window curl -s -o /dev/null -w '%{http_code}\n' "http://localhost:${VELLUM_PORT:-8080}/health" -
The log has no line that starts with
Vellum did not start.Terminal window docker compose logs vellum | grep "Vellum did not start" || true -
Sign in as the instance administrator. Open Settings, then Instance, then Diagnostics. No module lists a pending migration, and the database and the event store are reachable.
GET /api/instance/diagnosticsgives the same data. -
Open a project and play one scenario.
If the upgrade fails
Section titled “If the upgrade fails”A failed migration stops Vellum at start-up. The container exits, and the log ends with the error of the migration.
-
Keep the log.
Terminal window docker compose logs vellum > upgrade-failure.log -
Go back to the commit that you wrote down.
Terminal window git checkout <commit> -
Restore the backup on empty volumes, with the old source: Back up and restore. Do not start the old version on a database that the new version migrated.
Changes that people made after the backup are lost in this case. For that reason, make the backup immediately before the upgrade.
Migrations as a separate step
Section titled “Migrations as a separate step”Set Database__MigrateOnStartup=false when a deployment step applies the migrations and the app must not.
Vellum then starts only on a database that is up to date. On a database that is behind, the event store stops the start with the error DBX001. Vellum does not start describes it.
The justfile has one recipe for each module to create a migration. The repository has no command that only applies migrations: a start with Database__MigrateOnStartup=true applies them.