Challenge deploying different services from a mono repo
This is my first time trying to run multiple services from 1 repo on railway. (It's pretty straight forward when there's 1 docker file per repo).
My repo has a services/ directory with multiple services. Each has a dockerfile.
I'm not sure how to best go about deploying this on railway.
Solution:Jump to solution
please see this docs section then - https://docs.railway.app/guides/dockerfiles#custom-dockerfile-path
14 Replies
Project ID:
92c5e847-f796-4ffc-b29f-0c2a9bc86322
92c5e847-f796-4ffc-b29f-0c2a9bc86322
is there anything not answered by these two doc's pages?
https://docs.railway.app/tutorials/deploying-a-monorepo
https://docs.railway.app/guides/monorepo
So these were fantastic resources. I followed them and have my 'service' created but I don't know how to point it to the Dockerfile
have you set the root directory?
Yes I set it as the root of the project (default) because that is where the lib/ folder is which is used in building the docker container.
as shown here I believe
Each service uses the lib/ and jasper/ directory.
ah then that's a shared monorepo
Yessir!
Again thank you so much for your help man. I don't understand how you guys become so knowledeable in this space π
Solution
please see this docs section then - https://docs.railway.app/guides/dockerfiles#custom-dockerfile-path
for me, I've gained this knowledge just by helping
Incredible. Let me quickly give that a shot, looks exactly what I need
Everything's up and running. Thx boss!
Hey @Brody Might I ask 1 more quick question?
How comfortable should I feel, or rather, would you recommend sensitive keys (like API keys, etc) be passed into the docker container via the variables section?
I notice that there is a way to SEAL these variables however I noticed that there was a bug when done this way, where the variables (only the SEALED ones) aren't available to the container.
there shouldn't be that kind of bug, but if you are the only one who has access to the project you have zero reason to seal the variables
Gotcha thank you! How can I close out this ticket π Your help's been greatly appreciated!
we dont close, we just do that! π