Skip to content

Deploying

All deployments go through GitHub Actions in the fin-infra repo. The terminal scripts below do the same thing and exist as a fallback for local/debug use.

Deploy via GitHub Actions

  1. Go to fin-infra Actions
  2. Select Deploy to Staging (or Deploy to Production)
  3. Run workflow

Production deploy requires environment approval.

WorkflowTriggerPurpose
provision.ymlManualProvision Railway infra — dry-run / infra-only / services-only / all
deploy-staging.ymlManualDeploy to staging
deploy-production.ymlManual (with env approval)Deploy to production
scale-staging.ymlManual + daily scheduleScale staging up/down; auto-downs at 10:30 PM IST

Deploy a Single Service

GitHub Actions → Deploy to Railway → select the target service.

After Deploy Checklist

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

Rollback

See the Rollback Runbook.


Terminal (fallback)

Run from the railway/ directory in fin-infra, with the staging env vars exported:

bash
cd railway
export RAILWAY_API_TOKEN=...
export RAILWAY_PROJECT_ID=...
export RAILWAY_ENVIRONMENT_ID=...   # staging environment ID

Standard staging deploy:

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

Single service / subset:

bash
bun run scripts/deploy.ts blitz-api   # one service
bun run deploy:backend                # backend microservices only
bun run deploy:frontend               # frontend only

Scaling:

bash
bun run scale up all        # up:   all | backend | frontend | infra
bun run scale down all      # down: all | backend | frontend | infra

Staging scales down automatically every night at 10:30 PM IST.

Sync environment variables (after changing shared/variables.ts):

bash
bun run vars:sync