diff --git a/.railway/railway.ts b/.railway/railway.ts index 1eec44ba..3eb7454c 100644 --- a/.railway/railway.ts +++ b/.railway/railway.ts @@ -5,9 +5,11 @@ import { defineRailway, github, preserve, project, service } from "railway/iac"; // GitHub source per environment, as connected today. Omitting it disconnects -// the repo, and pushes stop deploying. dev has no repo connected. +// the repo, and pushes stop deploying. dev deploys develop unless a branch is +// under test. const SOURCES: Record> = { production: github("zernio-dev/zernio-python", { branch: "develop" }), + dev: github("zernio-dev/zernio-python", { branch: "develop" }), "zernio-mcp-dev": github("zernio-dev/zernio-mcp", { checkSuites: true }), }; @@ -25,7 +27,7 @@ const VARIABLES: Record = { "ZERNIO_MCP_APPS", ], "zernio-mcp-dev": ["MCP_PUBLIC_URL", "PORT", "SENTRY_DSN"], - dev: ["MCP_PUBLIC_URL", "PORT"], + dev: ["MCP_PUBLIC_URL", "PORT", "ZERNIO_MCP_APPS"], }; export default defineRailway((ctx) => { @@ -50,8 +52,15 @@ export default defineRailway((ctx) => { // setting it here shows as a change on every plan). deploy: { restartPolicyMaxRetries: 3, + // EU West (Amsterdam), next to the Zernio API. Streamable HTTP runs + // stateless, so replicas need no sticky sessions. Railway merges region + // maps, so a region we leave must be set to null (0 is rejected); the + // `replicas` shorthand cannot express that. + multiRegionConfig: { + "europe-west4": { numReplicas: environment === "production" ? 2 : 1 }, + "us-west2": null, + }, }, - replicas: { "us-west2": 1 }, domains: environment === "production" ? [{ domain: "mcp.zernio.com", port: 8080 }]