● Help · Maintenance
Updating
without losing data.
How to move to a new release: back up, replace the code, migrate, rebuild, redeploy.
01Update procedure
- Read the changelogCheck Changelog for migration notes and new variables.
- Back upDatabase dump and
.env(see Backups). - Replace the codeCopy the new release over your copy (or merge it if you changed the code). Keep your
.env; compare it with the new.env.examplefor new variables. - Install and check locally
pnpm install,pnpm -r typecheck,pnpm test. - Deploy the API
docker compose up -d --build. The image runs new migrations on start. - Rebuild the apps
pnpm --filter @kit/miniapp buildandpnpm --filter @kit/admin build, upload bothdistfolders. - Check
/health, Workspace settings, one Mini App session.
02What never to change during a live campaign
ENCRYPTION_KEY(bot tokens),ABUSE_HASH_SALT(anti-bot clusters and puzzle answers).- Upgrade card keys and a running season's points-per-XP (fixed by the API anyway).
- The contract, while a distributor is live: a published snapshot needs its exact contract.
03Local and test databases
pnpm db:migrate
DATABASE_URL=postgres://localhost:5432/campaign_kit_test pnpm db:migrate
DATABASE_URL=postgres://localhost:5432/campaign_kit_e2e pnpm db:migrate