From 3ec87c07641115e68fcd374dea0c02e715d6e666 Mon Sep 17 00:00:00 2001 From: Ricardo Vega Date: Fri, 2 Oct 2026 09:38:53 -0500 Subject: [PATCH] Keep RELAY_INBOUND_SECRET when Railway config is applied. The web variables in .railway/railway.ts are exhaustive: apply deletes any it omits. The inbound secret is set on all three environments now, so the file preserves it, and the README says to add new variables. Co-Authored-By: Claude Opus 5.5 (1M context) --- .railway/README.md | 3 ++- .railway/railway.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.railway/README.md b/.railway/README.md index 6476535..ec92b6e 100644 --- a/.railway/README.md +++ b/.railway/README.md @@ -16,7 +16,8 @@ railway config apply - **Partial `web`.** The file owns only the web service. Postgres, its volume, and slack-cards are not in it and apply never touches them. - **Variables.** Every value stays in Railway; the file marks each one - `preserve()`. Never put a secret here. + `preserve()`. Never put a secret here. **Add every new web variable to the + file as `preserve()`**: apply deletes any variable the file leaves out. - **Node version.** `RAILPACK_NODE_VERSION` comes from `../.nvmrc`. Railpack reads that variable before `package.json` engines, so it decides the Node a deploy runs. To apply everything except a Node change, set diff --git a/.railway/railway.ts b/.railway/railway.ts index 89722cc..c87c457 100644 --- a/.railway/railway.ts +++ b/.railway/railway.ts @@ -45,6 +45,7 @@ export default defineRailway((ctx) => { replicas: { "us-east4-eqdc4a": 1 }, domains: env.domains.map((domain) => ({ domain, port: 3000 })), // Values live in Railway, never in this file. preserve() keeps each one. + // Every variable on web must be listed here: apply deletes any it omits. env: { APP_BASE_URL: preserve(), APP_ENV: preserve(), @@ -57,6 +58,7 @@ export default defineRailway((ctx) => { RELAY_API_KEY: preserve(), RELAY_BASE_URL: preserve(), RELAY_CONNECT_PRODUCT: preserve(), + RELAY_INBOUND_SECRET: preserve(), RELAY_WEBHOOK_SECRET: preserve(), SESSION_SECRET: preserve(), STORE_BASE_URL: preserve(),