Rollback Runbook
Option 1: Railway Dashboard (Fastest)
- Open Railway → select the project
- Select the affected service
- Go to the Deployments tab
- Find the last known-good deployment
- Click Redeploy on that deployment
Railway will re-run the exact same image that was used for that deployment.
Option 2: GitHub Actions
- Go to fin-infra Actions
- Select Deploy to Railway
- Run workflow → select the target service
- Specify the previous image tag (e.g.
:<short-sha>)
Image Tags Reference
| Tag | Meaning |
|---|---|
latest | Most 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-apiTo 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)