chore(deploy): add railway.json build and deploy config#540
chore(deploy): add railway.json build and deploy config#540SantiagoDePolonia wants to merge 1 commit into
Conversation
Railway templates are composed in the dashboard, but a service deployed from this repo reads railway.json for its build and deploy settings. Without it, Railway autodetects the builder and runs no healthcheck, so a deploy is marked live as soon as the container starts rather than when the gateway can actually serve. Pins the Dockerfile builder and points the healthcheck at /health/ready, which probes storage and the Redis cache but deliberately excludes upstream provider reachability, so a provider outage cannot fail a deploy or pull a healthy instance out of rotation. Restarts are ON_FAILURE so a clean exit is not restart-looped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a ChangesRailway deployment
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Confidence Score: 5/5Safe to merge with minimal risk. The change is a small, inert deployment config file. The referenced No files require special attention.
What T-Rex did
Reviews (1): Last reviewed commit: "chore(deploy): add railway.json build an..." | Re-trigger Greptile |
What
Adds
railway.jsonso a GoModel service deployed on Railway picks up sane build and deploy settings.Why
Railway templates themselves are composed in the dashboard, but a service deployed from this repo reads
railway.jsonat the root for its build and deploy config. Without it Railway autodetects the builder and runs no healthcheck at all — a deploy is marked live the moment the container starts, not when the gateway can actually serve traffic.Choices
builder: DOCKERFILE— use the Dockerfile we already maintain instead of letting Railpack autodetect a Go build, so container deploys match local/compose deploys.healthcheckPath: /health/readyrather than/health. Readiness probes storage (required → 503) and the Redis cache (optional → degraded), and deliberately excludes upstream provider reachability (internal/server/readiness.go:44), so a provider outage can't fail a deploy or pull a healthy instance out of rotation. It's also auth-exempt (internal/server/http.go:194), so it works withGOMODEL_MASTER_KEYset, and its probes are capped at 2s so it can't stall behind async model discovery.restartPolicyType: ON_FAILUREwith 10 retries — a clean exit shouldn't be restart-looped.healthcheckTimeout— Railway's default is fine; no reason to pin a number we'd have to maintain.requiredMountPath— considered forcing a volume at/app/dataso SQLite survives redeploys, but it would also force a pointless volume onSTORAGE_TYPE=postgres/mongodbdeployments. Left to the template/service config instead.Validated against
https://railway.com/railway.schema.json(which isadditionalProperties: false, so unknown keys would be rejected).Impact
None for existing users — the file is inert unless deployed on Railway. This is groundwork for publishing a GoModel template to the Railway marketplace, which is a separate dashboard step.
Summary by CodeRabbit