Skip to content

fix(railway): root Dockerfile = MCP; Railway uses Dockerfile.web via RAILWAY_DOCKERFILE_PATH#41

Merged
hwesterb merged 1 commit intomainfrom
fix/railway-custom-dockerfile-path
Apr 18, 2026
Merged

fix(railway): root Dockerfile = MCP; Railway uses Dockerfile.web via RAILWAY_DOCKERFILE_PATH#41
hwesterb merged 1 commit intomainfrom
fix/railway-custom-dockerfile-path

Conversation

@hwesterb
Copy link
Copy Markdown
Member

Corrects the direction of #39. The right structure is:

What changed

  • `Dockerfile` restored to the original MCP content from build: add Dockerfile for Glama check + containerized use #37 (unchanged from there).
  • `Dockerfile.mcp` removed (superseded — the root file is the MCP one now).
  • `Dockerfile.web` created with the multi-stage build that's Railway's actual web build. Includes the `.claude-plugin/` and `skills/` COPY fix that would have been PR fix(docker): include .claude-plugin and skills #40 (hatchling's `force-include` needs them).
  • Railway env var `RAILWAY_DOCKERFILE_PATH=Dockerfile.web` set via `railway variable set` — this tells Railway to build from the non-canonical path instead of auto-detecting the root Dockerfile.

Why this is the right split

  • Glama: expects canonical `/Dockerfile` at the repo root for MCP introspection. We now have it.
  • Railway: has an explicit pointer to `Dockerfile.web` via env var that overrides auto-detection. No confusion.
  • No env var race: the `RAILWAY_DOCKERFILE_PATH` variable was set on Railway with `--skip-deploys`, so no deploy kicks off until this PR merges.

Test plan

  • `railway variables | grep -i dockerfile` shows `Dockerfile.web`
  • Deploy on merge builds from `Dockerfile.web`, not root `Dockerfile`
  • semahash.org serves the new build
  • Glama finds `Dockerfile` at canonical path when they scan (still the MCP content)

Correcting the direction of #39. The root `Dockerfile` is now back to
the MCP stdio server (its original canonical-path content, the artifact
Glama fetches). The multi-stage web build lives at `Dockerfile.web`, and
Railway is configured via the `RAILWAY_DOCKERFILE_PATH` environment
variable to build from it instead of auto-detecting the root Dockerfile.

Also folds in the missing-include fix from PR #40: `.claude-plugin/`
and `skills/` must be COPY'd before `pip install` because hatchling's
`force-include` demands they exist at build time.

Env var set on Railway separately via `railway variable set`.

Effective layout after this PR:

- `Dockerfile`       MCP stdio server (unchanged from #37)       → Glama
- `Dockerfile.web`   Multi-stage web build                        → Railway
- `.dockerignore`    Trims build context                          → both
- `railway.json`     Healthcheck + restart policy only            → Railway

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hwesterb hwesterb merged commit be80e43 into main Apr 18, 2026
5 checks passed
@hwesterb hwesterb deleted the fix/railway-custom-dockerfile-path branch April 18, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant