shared vs isolated monorepos best practice
fengning-starsend
HOBBYOP

a year ago

Hi,

What's best practice now for monorepos + railpack deployments? Is it better to have a shared monorepo with a single railway.toml file or a backend/railway.toml and frontend/railway.toml?

Would be wonderful to have more clarity around how the new monorepo model works and example .toml files (or even better, a full git project with .toml files and file structure).

Solved$10 Bounty

Pinned Solution

a year ago

As Jake had said, one toml per microservice is ideal!

When your root dir is set to something all imports are relative to that (as its root).

4 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


a year ago

One toml per microservice :)


Status changed to Awaiting User Response Railway 11 months ago


fengning-starsend
HOBBYOP

a year ago

The above approach recommends one toml per microservice, which I assume also means setting root dir for each service to the service directory, i.e. root = frontend/ for the frontend service and backend/ for backend respectively.

Doing this also means the Python code has to use all relative imports (i.e. no abs imports since the backend package only knows about itself in the railway deployment).

Is this the recommend best practice for monorepos from you guys (relative Python imports + rootdir = service backend and NOT project root)?


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

As Jake had said, one toml per microservice is ideal!

When your root dir is set to something all imports are relative to that (as its root).


Status changed to Solved uxuz 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...