How to deploy django backend from subfolder of github repository in Railway?

Viewed 32

I have created a project where I have my django backend and nextjs frontend in the same repository in different folders, I want to know if there is a way to deply my django backend from its subfolder and not have to make a separate repository for my backend.

I put my requirements.txt, runtime.txt and Procfile in the root folder and made the Procfile point to backend.myblog.wsgi but it didn't work.

1 Answers

There is an option in the settings of the railway deployment under the Service section where you can specify the root directory which by default is set to "/".

i changed that to "/backend" and it worked!

specify root directory setting

Related