Skip to content

Add Railway hosted deploy via Infrastructure as Code - #504

Merged
chiragjn merged 5 commits into
mainfrom
deploy-railway
Aug 31, 2026
Merged

chiragjn merged 5 commits into
mainfrom
deploy-railway

Conversation

@innoavator

@innoavator innoavator commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a one-project Railway hosted deploy (app + Postgres + Redis) using Railway Infrastructure as Code, so others can provision TrueForge on their own Railway account from this repo.
Also accept DATABASE_URL in hosted mode so managed Postgres (Railway and similar) can be wired without discrete POSTGRES_* vars.

Changes

  • Add .railway/railway.ts + .railway/README.md (IaC: trueforge service, Postgres, Redis, healthcheck, Dockerfile.dev)
  • Document Railway in README + Quickstart; mention Railway alongside Compose/Helm
  • Accept optional DATABASE_URL when STANDALONE=false (changeset for @truefoundry/trueforge)
  • Drop BuildKit type=cache mounts from Dockerfile.dev (Railway Metal requires a hardcoded service id in mount ids)
  • Bake HOST=0.0.0.0 / STANDALONE=false into Dockerfile.dev for container deploys
  • Add railway as a root devDependency for railway/iac imports
  • OIDC left commented/optional in IaC (auth off by default; enable before sharing a public URL)

How was this tested?

  • Manual Railway deploy: railway config apply, public domain, app healthy on /healthz
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, pnpm format:check (confirm locally / CI)

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Hosted-mode DB resolution changed (new DATABASE_URL precedence); misconfiguration could break Postgres connectivity, and Railway defaults ship without OIDC on a public URL.

Overview
Adds Railway as a hosted deployment path via .railway/railway.ts (app + Postgres + Redis, Dockerfile.dev, healthcheck, env wiring for DATABASE_URL, REDIS_URL, and PUBLIC_BASE_URL). README, Quickstart, and auth docs now list Railway alongside Compose and Helm.

Hosted Postgres config now prefers DATABASE_URL when STANDALONE=false, falling back to POSTGRES_* (documented in .env.example; patch changeset for @truefoundry/trueforge).

Dockerfile.dev drops BuildKit cache mounts for Railway Metal compatibility and bakes HOST=0.0.0.0 and STANDALONE=false for container deploys. Root railway devDependency and ESLint ignore for .railway/** support the IaC workflow.

Reviewed by Cursor Bugbot for commit 02a30d6. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 02a30d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@innoavator innoavator changed the title Added configuration to deploy to Railway Add Railway hosted deploy via Infrastructure as Code Aug 30, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 02a2979. Configure here.

Comment thread .railway/railway.ts Resolved
@chiragjn chiragjn self-assigned this Aug 31, 2026
@chiragjn
chiragjn enabled auto-merge (squash) August 31, 2026 11:30
@chiragjn
chiragjn merged commit f4fb4bd into main Aug 31, 2026
12 checks passed
@chiragjn
chiragjn deleted the deploy-railway branch August 31, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants