Git-integration builder ignores
railway.toml
builder = "DOCKERFILE"
and fails on a corrupt warm cache
sojstyles
HOBBYOP

13 days ago

Hi team,

Our service is configured (config-as-code, /railway.toml) to build with the Dockerfile:

[build]
builder = "DOCKERFILE"
dockerfilePath = "./Dockerfile"

Problem 1 — the builder directive is ignored on GitHub-push deploys. Every git-triggered

deployment is built by the Express/Railpack early-preview instead of the Dockerfile. The service

manifest on those deployments shows:

"builder": "RAILPACK", "dockerfilePath": null, "express": true

i.e. the railway.toml Dockerfile config is not being applied.

Problem 2 — the Railpack warm cache is corrupt and fails every build. The auto-generated setup

runs npm ci, which cannot delete the cached node_modules:

phase PHASE_SETUP failed (exit 217):
npm error code ENOTEMPTY
npm error syscall rmdir
npm error path /app/node_modules/@jridgewell/gen-mapping   (also /@floating-ui/utils)
npm error ENOTEMPTY: directory not empty, rmdir '/app/node_modules/...'

Every git deploy on SIT has FAILED since ~2026-08-07 14:25 EDT. Example failed deployments:

de6fca37, 1461e1bb, 313c65ed, 8aec593a (SIT).

What works: railway up honours the Dockerfile and builds cleanly on a Metal builder

([internal] load build definition from Dockerfile[deps] RUN npm ci → `[builder] RUN npm run

build). Successful deployments this way: cde10cf7(SIT),b7ed830f` (UAT). We also set

NO_CACHE=1 as a service variable.

Requests:

  1. Make the GitHub-integration builder honour railway.toml's builder = "DOCKERFILE" for this

    service (or tell us how to opt this service out of the Express early-preview builder — we can't

    find the toggle in Settings → Build).

  2. If Express must stay, please clear/rebuild the warm node_modules cache so npm ci stops

    failing on ENOTEMPTY.

We need git-push → Dockerfile deploys working again so we don't have to railway up by hand.

Thanks.

$10 Bounty

1 Replies

Railway
BOT

13 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 13 days ago


13 days ago

You can manually set the Config file path to /railway.toml

Open the Service Settings > On Config-as-Code section, Add Railway Config File Path

You can temporarily disable the Build Cache by adding NO_CACHE=1 to the Service Variables, and remove it when it's no longer needed

or just toggle Skipped Builds under the Config-as-Code section


Welcome!

Sign in to your Railway account to join the conversation.

Loading...