Skip to content

Deploy Runbook

Deployments run through GitHub Actions. The terminal scripts at the bottom are a fallback.

Prerequisites

  • Access to GitHub Actions
  • For terminal fallback: Bun installed, and RAILWAY_API_TOKEN / RAILWAY_PROJECT_ID / RAILWAY_ENVIRONMENT_ID exported

1. Build a New Image First (if deploying a code change)

  1. Go to the blitz or blitz-ui repo → Actions
  2. Run the relevant build-push-<service>.yml workflow
  3. Wait for the image push to GHCR to complete

2. Deploy via GitHub Actions

  1. Go to fin-infra Actions
  2. Select Deploy to Staging (or Deploy to Production)
  3. Click Run workflow
  • Always deploy to staging first and verify before promoting to production.
  • Production deploy requires environment approval.
  • Single service: Deploy to Railway → select the target service.

3. After Deploy Checklist

  • [ ] Health checks green in Railway dashboard
  • [ ] Verify frontend loads at https://letsgo.finaisse.com
  • [ ] Check logs: bun run logs
  • [ ] Smoke test critical API endpoints

Something Went Wrong?

See the Rollback Runbook.


Terminal (fallback)

bash
cd railway
export RAILWAY_API_TOKEN=...
export RAILWAY_PROJECT_ID=...
export RAILWAY_ENVIRONMENT_ID=...   # staging (or production) environment ID

Staging deploy:

bash
bun run provision:dry    # 1. Dry run first
bun run deploy:all       # 2. Deploy all services
bun run status           # 3. Verify

Production deploy — same, with the production RAILWAY_ENVIRONMENT_ID:

bash
export RAILWAY_ENVIRONMENT_ID=...   # production environment ID
bun run deploy:all
bun run status

Single service / subset:

bash
bun run scripts/deploy.ts blitz-api   # one service (blitz-api, ws, wfw, …)
bun run deploy:backend                # backend microservices only
bun run deploy:frontend               # frontend only