6 months 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).
Pinned Solution
5 months 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
6 months 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!
Status changed to Awaiting User Response Railway • 6 months ago
5 months 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 • 6 months ago
5 months 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 • 6 months ago