Skip to content

Rollback Runbook

Option 1: Railway Dashboard (Fastest)

  1. Open Railway → select the project
  2. Select the affected service
  3. Go to the Deployments tab
  4. Find the last known-good deployment
  5. Click Redeploy on that deployment

Railway will re-run the exact same image that was used for that deployment.

Option 2: GitHub Actions

  1. Go to fin-infra Actions
  2. Select Deploy to Railway
  3. Run workflow → select the target service
  4. Specify the previous image tag (e.g. :<short-sha>)

Image Tags Reference

TagMeaning
latestMost recent build from main
:<short-sha>Specific commit (all branches)
:<branch-slug>Branch builds (non-main)

Find the short SHA from the blitz or blitz-ui GitHub commit history, or from the previous successful deployment in Railway.

Registry: ghcr.io/finaisse-org/blitz-<service>

Option 3: Local Script

bash
cd railway
export RAILWAY_API_TOKEN=...
export RAILWAY_PROJECT_ID=...
export RAILWAY_ENVIRONMENT_ID=...

# Redeploy a specific service (picks up latest image)
bun run scripts/deploy.ts blitz-api

To pin a specific image tag, set the IMAGE_TAG environment variable before deploying (check scripts/deploy.ts for exact usage).

Emergency: Revert a Database Migration

Migrations in Blitz are managed per-domain package via Prisma.

See blitz/docs/database/migrations.md for rollback steps. Database rollbacks require developer access and should be coordinated carefully — they may require a service rollback to accompany the schema revert.

After Rollback

  • [ ] Verify service health: bun run status
  • [ ] Check logs: bun run logs -- --service <name>
  • [ ] Confirm the rollback resolved the issue
  • [ ] Open a post-mortem if this was a P1 incident (see Incident Response)