Railway deployment¶
Guidance for repositories deployed to Railway.
Detection evidence¶
The detector recognizes Railway when it finds:
railway.json.github/workflows/*.ymlmentioningrailwayREADME.mdmentioning Railway deploy instructionsDockerfilewith Railway deploy documentation (secondary signal)
Recommended profile¶
Railway projects are typically typescript-app or python-service depending on language. Railway does not have a dedicated profile.
python3 /path/to/repo-standards/scripts/detect_repo_standard.py --repo .
What should remain repo-specific¶
Railway deployment should usually remain repo-specific initially:
- Railway project linking and service configuration
- Deploy triggers (GitHub integration vs CLI vs workflow)
- Environment variables configured in Railway dashboard
railway.jsonbuild and deploy settings- Custom Dockerfile or Nixpacks configuration
What standards still apply¶
.repo-policy.ymlwith the appropriate language profile- AI/editor rules via Rulesync
- Semantic PR, AI rules check, docs check, secret scan workflows
- Dependabot
- CI workflows for lint, test, and build
.env.examplelisting required variables (blank values only)
First migration PR — do not change¶
- Do not change deploy behavior during first migration
- Do not modify
railway.jsonfor standards adoption - Do not replace Railway-linked deploy workflows
- Do not commit Railway tokens or project secrets
Secrets¶
Configure production secrets in the Railway dashboard or GitHub Actions secrets. Document required variable names in .env.example without real values.
Suggested follow-up improvements¶
After the first migration PR merges:
- Document Railway environments (staging, production) in
README.md - List required Railway variables in
.env.example - Reference the deploy workflow in
.repo-policy.ymldeploysection - Ensure CI validates the same build Railway deploys
- Review whether deploy should move to reusable CI patterns later