Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .railway/railway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, ReturnType<typeof github>> = {
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 }),
};

Expand All @@ -25,7 +27,7 @@ const VARIABLES: Record<string, string[]> = {
"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) => {
Expand All @@ -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 }]
Expand Down
Loading