Repository navigation
Move Railway from railway.json to Infrastructure as Code - #19
Merged
Merged
Conversation
.railway/railway.ts describes the web service in development, uat, and production, rebuilt from the live configuration with every variable preserved. Plan reports it already matches all three environments, and it has been applied to each with no change. It owns only web, so Postgres and slack-cards are untouched. RAILPACK_NODE_VERSION comes from .nvmrc. railway.json is deleted before Railway's 2026-12-01 cutoff. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #18. Merge order: #15 → #16 → #17 → #18 → this.
Railway stops reading
railway.json(Config as Code) on 2026-12-01. This replaces it with.railway/railway.ts, which is already applied to all three environments and changes nothing that runs.What the file says
webservice in each environment:develop,dev.coachatron.comstaging,uat.coachatron.commain,coachatron.comandwww.coachatron.comnpm run build, startnpm start, healthcheck/(30s), and 1 replica inus-east4-eqdc4a.preserve(), so no values are in git.web: it owns only the web service. Postgres, its volume andslack-cards(production) aren't declared, and apply can't touch them.RAILPACK_NODE_VERSIONis read from.nvmrc.What was done to the live project
railway config plan(Node preserved)railway config migrate --apply --service webrailway config apply(Node preserved)Nothing was redeployed, and no setting or variable changed. Railway never reads
.railway/on deploy, so merging this changes nothing by itself. Oncerailway.jsonis gone, deploys use the service settings above, which the plan confirms are already in place.The unsafe path I didn't take
railway config migrate's own output named the servicecoachatron(the live one isweb) and declared only build, start and healthcheck.planshowed that applying it would delete all 14 web variables (DATABASE_URL,SESSION_SECRET, the relay keys…) and detach the GitHub source. I rebuilt the file fromrailway config pullin each environment instead.Node 24 rollout (done 2026-10-01, owner-approved)
config apply:RAILPACK_NODE_VERSION22 → 24railway variable set(see below)8cb1fb39f4239497012f4node -vin the container/,/signin/ DB-backed 404coachatron.comandwwwconfig planafterwardsslack-cardsand Postgres were not touched. Production's previous deploymentbf066ff6, still on Node 22, is the rollback point.Railway bug: in production,
config applywith any change fails with "Custom-domain registration is not supported" forcoachatron.comandwww.coachatron.com. Both domains exist, are verified and have valid certificates, andplanshowed only the variable change. The apply was refused before changing anything. The workaround is documented in.railway/README.md.Guards
test/toolchain.test.tsfails ifrailway.jsoncomes back, if the file stops taking Node from.nvmrc, or if it starts declaring Postgres or slack-cards.Checks (Node 24)
npm test101/101, plus typecheck, lint (0 errors) and build.railway config planreports "already up to date" in all three environments afterrailway.jsonwas deleted.🤖 Generated with Claude Code