惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
J
Java Code Geeks
IT之家
IT之家
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
P
Proofpoint News Feed
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
B
Blog
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
博客园 - 聂微东
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
U
Unit 42
aimingoo的专栏
aimingoo的专栏

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders
Deploying Monorepo Applications
Greg Schier · 2021-11-25 · via Railway Blog

A "monorepo" can be roughly defined as a single source code repository that contains multiple, independent components. A common example is a web application that contains both a frontend and backend component.

Monorepos usually come in two distinct types based on whether the components share code or configuration between them.

Isolated Monorepo

A repository that contains components that are isolated to the directory they are contained within and do not directly depend on anything outside of this directory (eg. JS frontend and Python backend).

Shared Monorepo

A repository that contains components which share code or configuration from the root directory or other components in the monorepo (eg. Yarn workspaces or Lerna project).

At Railway, we've been watching the demand for monorepo support steadily increase. But until recently, we didn't have a great solution for deploying them. While we're still working on adding even better support for monorepo deployments, we now offer some basic features that can be used to deploy most monorepo applications today.

Custom Root Directories for Isolated Monorepos

Isolated monorepo components are 100% contained in the folder they reside in. For these, we can configure the deployment trigger's "Root Directory" to tell Railway to only look at the specified subdirectory when building the application. Once the trigger is activated, only this directory will be cloned so it will be as if nothing outside it exists.

Untitled
Untitled

Custom Start Commands for Shared Monorepos

Components within shared monorepos usually depend heavily on one another to operate. These repositories usually define a global build command that compiles and links all components and dependencies together. Both Yarn workspaces and Lerna projects are common methods for managing these types of JavaScript-based monorepos.

Since each component depends on code and configuration outside its own directory, the Root Directory feature that we used previously will not work. Instead, we'll make use of a brand new Railway feature: Custom Start Commands.

Untitled
Untitled

After configuring a custom start command Railway will build the application as it usually does, except it will start the deployment with the given command, instead of the one it detected automatically. This means you can deploy the same monorepo to multiple Railway projects and run a different component within each one.

Stay Tuned For More

While these tools get the job done for most monorepo setups, we still have a few tricks up our sleeves for the future. If you have any questions or feedback on monorepo support (or anything else, really) please feel free to join our Discord Community! 🤗