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
- Go to fin-infra Actions
- Select Deploy to Staging (or Deploy to Production)
- Run workflow
Production deploy requires environment approval.
| Workflow | Trigger | Purpose |
|---|---|---|
provision.yml | Manual | Provision Railway infra — dry-run / infra-only / services-only / all |
deploy-staging.yml | Manual | Deploy to staging |
deploy-production.yml | Manual (with env approval) | Deploy to production |
scale-staging.yml | Manual + daily schedule | Scale 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 IDStandard staging deploy:
bash
bun run provision:dry # 1. Dry run first
bun run deploy:all # 2. Deploy all services
bun run status # 3. VerifySingle service / subset:
bash
bun run scripts/deploy.ts blitz-api # one service
bun run deploy:backend # backend microservices only
bun run deploy:frontend # frontend onlyScaling:
bash
bun run scale up all # up: all | backend | frontend | infra
bun run scale down all # down: all | backend | frontend | infraStaging scales down automatically every night at 10:30 PM IST.
Sync environment variables (after changing shared/variables.ts):
bash
bun run vars:sync