Campaign Kit docs
v0.1.0
Get help
● Help · Maintenance

Updating
without losing data.

How to move to a new release: back up, replace the code, migrate, rebuild, redeploy.

01Update procedure

  1. Read the changelogCheck Changelog for migration notes and new variables.
  2. Back upDatabase dump and .env (see Backups).
  3. 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.example for new variables.
  4. Install and check locallypnpm install, pnpm -r typecheck, pnpm test.
  5. Deploy the APIdocker compose up -d --build. The image runs new migrations on start.
  6. Rebuild the appspnpm --filter @kit/miniapp build and pnpm --filter @kit/admin build, upload both dist folders.
  7. 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