a month ago
Project Theri.App (ecea18ad-1f41-4d54-9565-6c01e34ad02b), environment production. Monorepo deploying three services from the same GitHub repo: @wildsoul/api uses the root /Dockerfile, wildsoul-web has build.dockerfilePath=/Dockerfile.web, wildsoul-admin has build.dockerfilePath=/Dockerfile.admin (both verified as set via railway environment config --json).
Bug: automatically triggered deployments ignore build.dockerfilePath and build the repo ROOT Dockerfile (the API one). Reproduced on service wildsoul-admin (9f6c46bb-32f3-4e36-83ea-627d7bb2bf6e) across three trigger types:
- GitHub push trigger: deployment d08fbffb-9281-4d25-ac74-2678f98b6440 (2026-09-01 14:38 UTC) - build log says "load build definition from Dockerfile" instead of Dockerfile.admin. Cancelled mid-build.
- Variable-change trigger: deployment 3006ef2f-2ca0-47b5-ac4f-0382645eff52 (2026-09-01 09:35 UTC) - same wrong build definition; cancelled. On 2026-08-31 ~23:17 UTC one of these wrong images even RAN for a few minutes (our API image, holding DATABASE_URL) as a duplicated API against production, before we added an explicit startCommand as a fuse.
- GraphQL serviceInstanceDeploy: same behavior (several times on 2026-08-30 during provisioning).
Control case: "railway redeploy -s wildsoul-admin -y" one minute after the push failure built CORRECTLY - deployment 883ad9e9-6329-4d44-a10f-84b77b2dd37b (14:39 UTC), build log "load build definition from Dockerfile.admin", SUCCESS.
Impact: auto-deploys are unusable for the two non-root-Dockerfile services; new code only ships via manual redeploy. Could trigger-initiated builds honor build.dockerfilePath, or is there something we are missing? Thanks!
1 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
Your repo has a railway.toml at the root, and all three services are reading it. It sets dockerfilePath = "Dockerfile" plus the API's startCommand, and config as code always overrides dashboard settings, so admin and web end up building the API image. Your build.dockerfilePath values are set correctly, they're just being overridden at build time.
railway redeploy looked clean because a redeploy rebuilds from the existing snapshot and never re-reads the config file. That same override is why the wrong image came up as a second API on 08-31, the start command came from railway.toml too.
To fix it, rename railway.toml to railway.api.toml and point the API service at /railway.api.toml with the Railway Config File setting. Admin and web will then find no root config and use their own settings. Don't just delete the file, your API's healthcheck path and start command only exist there.
Worth knowing: Config as Code is deprecated with a hard cutoff on 2026-12-01. railway config migrate folds every railway.toml in a monorepo into a single .railway/railway.ts when you're ready to move.
Status changed to Awaiting User Response Railway • about 1 month ago
a month 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 • 27 days ago