11 days ago
Migrating several projects from railway.toml to Infrastructure as Code ahead of the 2026-12-01 cutoff. All are Python/FastAPI backends in monorepos, built from a Dockerfile, deployed from GitHub. CLI 5.57.2.
Three blockers below. (1) and (2) determine whether the migration can be completed at all before the deadline.
1. Is there an IaC equivalent of watchPatterns?
One service's railway.toml uses:
[build]
watchPatterns = ["backend/**", "start.sh", "Dockerfile", "requirements-prod.txt", "railway.toml"]
The IaC reference documents build, start, preDeploy, healthcheck, healthcheckTimeout, replicas and source, but nothing for gating which file changes trigger a rebuild.
Is there a watchPatterns equivalent in IaC today, or one planned before 2026-12-01? If not, what is the recommended replacement?
Why it blocks: the repo is a monorepo — Python backend, web frontend, a mobile app, docs and scripts. Migrations run on container start, so every rebuild runs them. Measured over one week, 4 of 5 pushes correctly skipped a production rebuild. Without watch gating, every docs-, scripts- or mobile-only commit would restart production and re-run migrations.
2. Are the Python and Go SDKs published anywhere?
railway config migrate --lang py emits:
from railway_sdk import define_railway, project, service
railway_sdk does not appear to be on PyPI, under that name or obvious variants. (There is an unrelated railway 0.0.4 package there.) railway config plan then fails because the import cannot resolve, so the --lang py output is not currently usable. Presumably the same applies to --lang go.
Is railway_sdk published, under a different name or index? If not, is a PyPI release expected before 2026-12-01?
Why it matters: TypeScript appears to be the only working authoring language today, and npm install railway has to go at the repository root. For a Python backend whose root has no package.json, that means adding a root package.json plus node_modules purely to hold deploy config — and it risks changing builder auto-detection on a repo that currently builds from its Dockerfile. If a Python SDK is close, waiting is clearly better than restructuring three repos.
3. Where does a Config-as-Code healthcheckPath appear in project state?
With this in railway.toml:
[deploy]
healthcheckPath = "/health"
the healthcheck does not appear in railway config pull --json, nor in the service config via the public API. The service’s config field is null, and build.builder reports RAILPACK even though the service builds from a Dockerfile.
My reading is that Config-as-Code settings are applied per-deployment and never written to the service record, so their absence from project state is expected. Is that correct?
And what is the correct way to verify that a healthcheck is actually active on a running service, without triggering a deploy? A before/after check is needed to prove the migration preserved it. (Deploy logs would show it, but mine have aged out of retention.)
Related: does railway config migrate --apply — which “clears Railway Config File settings” — leave a window in which neither the old nor the new config is in effect? If so, what is the safe ordering: apply IaC first and then remove railway.toml, or the reverse?1 Reply
11 days ago
The Python SDK is published as railway-sdk on PyPI (pip install railway-sdk), imported as railway_sdk, and the Go SDK is github.com/railwayapp/[email protected] with go.mod next to .railway/railway.go. Both are beta, so you don't need a root package.json for a Python repo.
The IaC service reference has no watch-pattern field. Watch paths are still an ordinary service setting you can set in the service's settings or with the public API serviceInstanceUpdate mutation (watchPatterns), so mirror your toml patterns there before the cutoff. We haven't confirmed whether a later railway config apply leaves that setting untouched, so check it after your first apply.
Your reading of Config as Code is correct: the file is read at deploy time and overrides the service's settings for that deployment, so its healthcheck doesn't appear in project state. The same applies to anything else the file sets. After 2026-12-01 any value set only in the toml stops applying.
migrate --apply writes the IaC file and clears the Railway Config File setting, but service settings only change when you run railway config plan and railway config apply. Run those immediately after, before the next deploy, then check the service settings for the healthcheck path. Migrate every service in an environment in one run without --service. A single-service migrate creates a named partial that blocks applies for the whole project later.
Status changed to Awaiting User Response Railway • 11 days ago
4 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 days ago