Upgrade the Compose bundle
1
Snapshot the database first
A migration rolls forward only — there are no down-migrations. Before an
upgrade that carries schema changes, take a Postgres snapshot (a managed
provider’s point-in-time restore, or
pg_dump) so a bad release is a restore
away. Recovery is restore-then-re-migrate, never a rollback.2
Pin the new tag
Set
TAI_VERSION in .env to the release you are moving to.TAI_VERSION in .env
3
Pull it
4
Run the migrations
db-migrate service runs tai db migrate, which applies every
pending migration across every component — the core chain and each installed
plugin that owns one — in order, recording each in the tai_schema_history
table. It is idempotent: a run with nothing pending reports so and exits 0.
Preview a run first with docker compose run --rm db-migrate db migrate --plan,
which lists the pending files without touching the database.5
Recreate the app services only
--no-deps recreates the three app services against the new image without
restarting Postgres or Redis, so the datastores — and their volumes — stay
up.Read the release notes before pinning. A release that needs a step beyond the
migration run — a data backfill, a manual expand/contract cutover — names it.
The boot gate
Eachserve and backend container checks, once at startup, that every schema
chain its configured features and plugins own is fully applied. A pending
migration or a rewritten (checksum-mismatched) chain is a loud refusal, not a
half-migrated serve:
db-migrate, they refuse
to boot with exactly this message — run the migrations and they come up. Running
db-migrate before the app services (the step order above) avoids the refusal
entirely.
Runtime-installed plugins
An image upgrade replaces the core only. Plugins added at runtime through the marketplace live in the server’s plugin prefix (TAI_PLUGINS_PREFIX), not in the image, so they do not update with a new image
tag — a freshly pinned image boots with the same plugin versions the prefix
already holds.
Update them as a step of their own, after the image upgrade:
See also
- Verify artifacts — confirm the new tag before you run it.
- Back up and restore — capture state before an upgrade.

