LVKVLVS
LVKVLVS
RRailway
Created by LVKVLVS on 7/29/2024 in #✋|help
Import code from parent directory
I have 2 railway services: api task_queue Both are written in Python and are the replications of my monorepo structure - 2 directories in a single repository. task_queue uses some code which is defined in api (which is also in api directory, so I can't just move the code there), the way I do that in task_queue is by injecting root path in sys.path, that way I can import the code from api. Works well on my local but doesn't work in Railway - I get ModuleNotFoundError during the deployment stage. I have root paths defined for both services to /api and /task_queue, respectively. How can I use the code defined in /api inside of /task_queue? Any help would be appreciated
5 replies
RRailway
Created by LVKVLVS on 2/25/2024 in #✋|help
Can't deploy monorepo, can't change root path
Hello, I'm trying to deploy monorepo (two isolated services), the documentation says that you should change the root path, yet I don't have such option available on Railway project dashboard. furthermore it's not clear how would I setup two independent services, would they require 2 separate railway.json config files for each service? I couldn't find any exhaustive resource on this topic. Any help would be much appreciated!
17 replies