fix(examples/init-example): pin Railway build to local Dockerfile#522
Merged
fix(examples/init-example): pin Railway build to local Dockerfile#522
Conversation
The Railway "example node" service deploys with rootDirectory set to
examples/ts-node-examples/init-example/. With no local railway.json,
Railway falls back to the repo-root /railway.json, which targets
deployments/docker/Dockerfile.control-plane. That Dockerfile expects
the repo root as build context (it COPYs control-plane/web/client/...),
but the build context here is the example dir, so the build fails with:
failed to compute cache key: "/control-plane/web/client": not found
Add an example-local railway.json that pins the build to the existing
Dockerfile in this directory, so the example builds as the simple Node
agent it is and is no longer coupled to the control-plane template
config.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
AbirAbbas
added a commit
that referenced
this pull request
May 3, 2026
…#523) * fix(railway): remove dead repo-root railway.json Every Railway template that ships AgentField (controlplane-template, sec-af, swe-af, contract-af, cloudsecurity-af, agentfield-deep-research) deploys the control plane via the prebuilt image agentfield/control-plane:latest, not by building this repo. No live service in the workspace builds the agentfield repo as a control plane, and deployments/railway/README.md documents image-based deploys only. This file was a leftover from before the switchover to prebuilt images. Worse, it actively breaks any service that points at a sub-path of the repo via rootDirectory: Railway falls back to /railway.json, finds "dockerfilePath: deployments/docker/Dockerfile.control-plane", and tries to build the control plane Dockerfile against the sub-path's context — which has no control-plane/ directory, so the first COPY fails with: failed to compute cache key: "/control-plane/web/client": not found That's exactly what the controlplane-template's "example node" service (rootDirectory /examples/ts-node-examples/init-example) hit on every fresh template instantiation since PR #151. With this file gone Railway falls through to auto-detecting the local Dockerfile in the service's rootDirectory, which is what the example was always meant to use. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(examples/init-example): drop now-redundant railway.json Added in #522 as a defensive override against the dead repo-root railway.json. With that root file removed in the previous commit, Railway auto-detects the local Dockerfile in the service's rootDirectory on its own, so this per-example config is dead weight too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (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.
Summary
github-buddyproject (rootDirectoryexamples/ts-node-examples/init-example/) has been failing on every deploy withfailed to compute cache key: "/control-plane/web/client": not found.railway.json, which buildsdeployments/docker/Dockerfile.control-plane. That Dockerfile expects the repo root as its build context (COPY control-plane/web/client/...), but Railway scopes the context to the service's rootDirectory — wherecontrol-plane/doesn't exist.railway.jsoninto the example pinning the build to the localDockerfile(the simplenode:20-alpine+npm startimage already in the directory). This decouples the agent example from the control-plane template config.Test plan
example nodeservice ingithub-buddyagainst this branch and confirm the build usesexamples/ts-node-examples/init-example/Dockerfileand succeeds.