|
3 | 3 | All deployable application services run on Railway from **this one repository** |
4 | 4 | (PRD §17.5, §22.1). No alternative application host is permitted for V1. |
5 | 5 |
|
| 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 | + |
6 | 43 | Every service below points at the same Git repo with a service-specific root |
7 | 44 | directory, build command and watch path. A protocol change therefore rebuilds |
8 | 45 | the client, the API and the match service from one commit. |
|
0 commit comments