Skip to content

Commit 2d0ffd2

Browse files
ralyodioclaude
andcommitted
docs(railway): describe the deployment as it actually is
Records the single-service shape now in production, and the two traps that made the deploy look broken: watch paths skip builds silently rather than failing them, and a manual `railway up` marks a concurrent webhook build REMOVED, which reads like the GitHub trigger not firing when it did. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 124c275 commit 2d0ffd2

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

infra/railway/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,43 @@
33
All deployable application services run on Railway from **this one repository**
44
(PRD §17.5, §22.1). No alternative application host is permitted for V1.
55

6+
## Current shape: one service, not seven
7+
8+
Production today runs the **whole stack in a single Railway service**
9+
(`nightcell7`) from the root `Dockerfile`. `tools/release/start-all.mjs`
10+
supervises the processes and the gateway binds `$PORT`, proxying to the site,
11+
game, API and multiplayer on localhost.
12+
13+
The per-service matrix below is the target topology and the files for it exist
14+
(`infra/docker/<service>.Dockerfile`, `services/*/railway.json`). Splitting is
15+
four environment variables — the gateway's upstream URLs — not a rewrite.
16+
17+
Trade-offs accepted for now: a multiplayer redeploy also restarts the site, and
18+
match servers cannot scale independently. Revisit before real player load.
19+
20+
## Deploy trigger
21+
22+
Pushes to `main` **do** auto-deploy via the GitHub connection.
23+
24+
Two traps that made this look broken:
25+
26+
1. **Watch paths silently skip.** Railway reported `no changes detected in
27+
watch paths, build will skip` and marked deployments `SKIPPED`, not
28+
`FAILED`. Nothing warns you; the service just never updates.
29+
`railway.json` now sets `watchPatterns: ["**"]`.
30+
2. **`railway up` supersedes a webhook build.** A manual upload started
31+
seconds after a push will mark the GitHub-triggered deployment `REMOVED`.
32+
That is not the webhook failing — check timestamps before concluding it is.
33+
34+
Prefer letting the push deploy. Use `railway up` only to deploy uncommitted
35+
work.
36+
37+
## Railpack does not work here
38+
39+
`railpack` cannot detect a start command in a 20-package pnpm workspace and
40+
fails with "No start command detected". Every service is Dockerfile-built;
41+
`RAILWAY_DOCKERFILE_PATH` selects which one.
42+
643
Every service below points at the same Git repo with a service-specific root
744
directory, build command and watch path. A protocol change therefore rebuilds
845
the client, the API and the match service from one commit.

0 commit comments

Comments
 (0)