Skip to content

chore(railway): migrate from railway.toml to railway.ts - #288

Open
Anmol-Baranwal wants to merge 5 commits into
CopilotKit:mainfrom
Anmol-Baranwal:chore/railway-iac-migration
Open

Anmol-Baranwal wants to merge 5 commits into
CopilotKit:mainfrom
Anmol-Baranwal:chore/railway-iac-migration

Conversation

@Anmol-Baranwal

Copy link
Copy Markdown
Contributor

Railway stops reading railway.toml files on Dec 1, 2026. This moves all 8 Outpost services to .railway/railway.ts, Railway's new config format, and removes the old railway.toml files.

What's in it

  • Same Dockerfile, restart and healthcheck settings as each service had before
  • Production builds from main, staging from staging
  • Waits for CI before deploying, same as now
  • slack-bot, teams-bot and linear-sync stay manual deploy only
  • The release bot runs in production only
  • Deployment docs and the release bot README now point to railway.ts

Safety

  • The file only manages these 8 services, so it never touches the Postgres databases
  • It refuses to apply in an environment until that environment's variables are copied in, so secrets can't be wiped

Before merging (needs Railway access)

Keep this as a draft until then. The services still read the old files, so merging early breaks their next deploy.

  1. Run railway config pull for staging and production, and copy the variables into .railway/railway.ts
  2. Merge, then in the same sitting clear each service's config file path in Railway
  3. Run railway config plan and check it removes nothing
  4. Run railway config apply

Full steps are at the top of .railway/railway.ts.

Railway stops reading railway.toml files on Dec 1, 2026. Add
.railway/railway.ts with the same build and deploy settings for all
8 Outpost services, plus the railway SDK it needs.
Settings now live in .railway/railway.ts. Update the deployment docs
and the release bot README to match.
@NathanTarbert
NathanTarbert marked this pull request as ready for review November 2, 2026 12:20
@NathanTarbert

Copy link
Copy Markdown
Collaborator

Hey @Anmol-Baranwal, thanks for getting ahead of the Railway change. Every service keeps the same Dockerfile, restart policy and health check as its old railway.toml. The release bot's hourly schedule and watch patterns carried over exactly too. Keeping Postgres out of what the file manages is a really nice touch.

There's one thing I'd like to sort out before this lands, and it's in the docs rather than the config.

The Railway section in apps/docs/deployment/index.html and the Quick Start in docs/deployment.md are written for people setting up their own copy of Outpost. The first step is "Fork or push the repo to GitHub". With this change, both now tell that reader to run railway config apply. But .railway/railway.ts is set up for our own Railway project. VARIABLES_IMPORTED starts empty, so the apply stops with an error. Only environments named production and staging are accepted. Both deploy sources point at CopilotKit/outpost. So someone following the guide on a fresh project gets stopped by the guard. If they edit their way past it, their services end up connected to our repo instead of their fork.

A short note next to those steps would cover it. It could say the file is set up for CopilotKit's project, and that a fork needs to change the repo name and fill in its own environments and variables before applying. If you'd rather keep the old per-service file approach documented for self-hosters instead, that works for me too.

One more thing. The description says to keep this as a draft until the Railway variables are copied in, but it's currently open as a regular PR. Could you switch it to a draft so nobody merges it early by accident? Once the cutover steps are done I'm happy to pair on the plan check if that helps.

This branch has not been deployed

No deployments
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