Updates
You update Lalabase from one release to the next: check out the new release, pull its image, done. Migrations and data backfills run by themselves when the container starts.
Before updating
Take a fresh backup before every update. Database migrations are not always backward-compatible.
Read the upgrade notes. Every release has an Upgrade notes section in CHANGELOG.md:
what you have to do when you update, such as adding a new environment variable to .env,
taking over a changed compose.yml or running a data task. "None." means there is nothing
to do. If you skip several releases, read the notes of each.
Performing the update
# Note which release you are on (for a rollback)
git describe --tags
# Fetch and check out the new release
git fetch --tags
git checkout 2026.12.0 # the number of the new release
# Pull the image of that release and restart the containers
docker compose pull
docker compose up -d
Up to 2026.10.1, a release builds its image from the checkout: its compose.yml has a build: line. There docker compose pull fails for web with "pull access denied", and docker compose up -d starts the image you already have, so the instance stays on the old version. Run docker compose up -d --build instead of the two last commands. The first release after 2026.10.1 pulls its image; checking it out brings the new compose.yml, and the commands above work from then on.
The compose.yml of each release names the image of that release
(ghcr.io/lalabase/lalabase:2026.12.0), so checking out the tag is what picks the version.
If you build the image yourself (see Docker Compose),
run docker compose up -d --build instead of the two last commands.
On start the container applies the migrations and runs the data backfills
(db:prepare lalabase:data_backfills). Both are idempotent: a second run costs nothing.
Without Docker, run bin/rails db:migrate lalabase:data_backfills yourself after each update.
Without Docker, also: if the new release names another Ruby version in .ruby-version
(2026.11.1, for example, 4.0.10), install it before you update, and with it the Bundler
version named under BUNDLED WITH in Gemfile.lock (gem install bundler -v 2.6.6). A new
Ruby version brings a newer Bundler, and that one rewrites the lock's platforms.
Data tasks after the migration
Most data backfills run by themselves on start (see above). Some tasks do not, because
you should see what they do with DRY_RUN=1 first. The upgrade notes of the release name
them, with the commands, and say when they are needed: 2026.10.1, for example, asks for
rich_text_embeds:resign_sgids only if the instance ever got a new SECRET_KEY_BASE. All
of them are idempotent: a second run costs nothing.
Mind the architecture
The release images exist for x86_64 (amd64) and ARM (arm64); Docker picks the right one by itself. If you build the image yourself, build it on the machine it runs on, or explicitly for that machine's architecture: native extensions do not carry over between ARM and x86_64.
Rollback
If something goes wrong, check out the previous release again (git checkout 2026.11.0, the
number git describe --tags showed before the update) and start its image with
docker compose up -d. If you build the image yourself, or go back to 2026.10.1 or earlier,
use docker compose up -d --build.
If the update applied a migration, also restore the backup from before the update: the old code does not run against the new schema.
One exception concerns the help texts the assistant reads. Lalabase never syncs them back to older files by itself, so that a process of the old version cannot turn them back during an update. After a rollback the assistant therefore keeps reading the newer texts until you sync them:
docker compose exec web bin/rails product_knowledge:sync