Gate optional subsystems behind INIT_SUBSYSTEMS to enable Railway deployment#16
Draft
Copilot wants to merge 2 commits intofix/railway-deployfrom
Draft
Gate optional subsystems behind INIT_SUBSYSTEMS to enable Railway deployment#16Copilot wants to merge 2 commits intofix/railway-deployfrom
Copilot wants to merge 2 commits intofix/railway-deployfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
- Move /health endpoint to be registered immediately after express app creation - Gate subsystems (seedDreams, scoring, mesh) behind INIT_SUBSYSTEMS env var - Dynamically import mesh module only when subsystems are enabled - Add INIT_SUBSYSTEMS documentation to .env.example - Add *.tsbuildinfo to .gitignore to exclude build artifacts - Subsystems disabled by default (safe for Railway deployment) - All existing API routes and behavior unchanged Co-authored-by: BrandonDucar <220308276+BrandonDucar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update DreamNet server for Railway deployment compatibility
Gate optional subsystems behind INIT_SUBSYSTEMS to enable Railway deployment
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Railway deployments require the server to start quickly with minimal resource usage for health checks before provisioning full resources. Currently, the server unconditionally initializes heavyweight subsystems (seed data, scoring engine, mesh network) on startup, causing deployment failures.
Changes
server/index.ts
/healthendpoint registration before route setup - ensures liveness checks succeed even if subsystems fail to initializeINIT_SUBSYSTEMS === "true"- seedDreams, startScheduledScoring, and mesh network only start when explicitly enabledimport { startMesh }to dynamicimport("./mesh")to avoid loading dependency tree when disabled.env.example
INIT_SUBSYSTEMSdocumentation with default (disabled) and usage.gitignore
*.tsbuildinfoto exclude TypeScript incremental build artifactsBehavior
/healthresponse shape and all/api/*endpointsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
mainnet.base.org/usr/local/bin/node --require /home/REDACTED/work/dream-net/dream-net/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/preflight.cjs --import file:///home/REDACTED/work/dream-net/dream-net/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/loader.mjs server/index.ts(dns block)sepolia.base.org/usr/local/bin/node --require /home/REDACTED/work/dream-net/dream-net/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/preflight.cjs --import file:///home/REDACTED/work/dream-net/dream-net/node_modules/.pnpm/tsx@4.20.6/node_modules/tsx/dist/loader.mjs server/index.ts(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Make the DreamNet server safe to deploy on Railway by applying the following changes on branch
fix/railway-deployand opening a PR againstmain.Requirements and constraints
Files to change/add
runs-on: ubuntu-latest
steps:
Testing and validation
Implementation notes for the agent
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.