R
Railway8mo ago
Tuncay

Monorepo

Hi l, I have 3 independant projects in my Git repo which are mapped to 3 different service in a Railway project. I dont want a change to one project build and deploy other projects or services whithen same repo. Is that possible ?
4 Replies
Percy
Percy8mo ago
Project ID: eb3e87db-2f5c-4c3d-9382-bf66a4bc4e0c
Tuncay
TuncayOP8mo ago
eb3e87db-2f5c-4c3d-9382-bf66a4bc4e0c
Duchess
Duchess8mo ago
New reply sent from Help Station thread:
Oh, I do this myself. I use "entrypoints" directory in root folder of the project. I then structure it like this:
├── dev_demo
│   ├── railway.json
│   └── run.py
├── graphs_server
│   ├── railway.json
│   └── run.py
├── __init__.py
├── log_viewer
│   ├── railway.json
│   └── run.py
├── dev_demo
│   ├── railway.json
│   └── run.py
├── graphs_server
│   ├── railway.json
│   └── run.py
├── __init__.py
├── log_viewer
│   ├── railway.json
│   └── run.py
Each railway.json has config for running its specific thing, usually it just runs the run.py in its folder but you can configure it depending on your needs. Then when deploying I go to settings -> config as code and put a path to that file, for example entrypoints/dev_demo/railway.json My config here looks like this:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE"
},
"deploy": {
"numReplicas": 1,
"startCommand": "python -m entrypoints.dev_demo.run",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE"
},
"deploy": {
"numReplicas": 1,
"startCommand": "python -m entrypoints.dev_demo.run",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
The "run.py" name got some weird formatting, but the idea should be clear :)
You're seeing this because this thread has been automatically linked to the Help Station thread.
Brody
Brody8mo ago
as long as the individual apps don't need to access files from the other apps the correct way would be to set the root directory accordingly in the service settings
Want results from more Discord servers?
Add your server