Turborepo deployment
Project ID: baf32686-aca8-4ef9-8696-294e237d314a
I want to deploy app that is written in Next.js and Fastify. I deployed them as a "Deploy from repository", and it deployed frontend and assigned domain to it, but I don't know how to make request to backend. In logs i can see the service is running.
I tried to deploy them as 2 different services on railway but it cannot find pnpm-lock.yaml file since it is in root directory.
Solution:Jump to solution
Okay, I managed to deploy my app. I had to create 2 railway services, one that build and run frontend only with
--filter
flag, and the same for backend.8 Replies
Project ID:
baf32686-aca8-4ef9-8696-294e237d314a
Maybe this can be of some assistance
https://docs.railway.app/deploy/monorepo
Solution
Okay, I managed to deploy my app. I had to create 2 railway services, one that build and run frontend only with
--filter
flag, and the same for backend.However, I have another question. Can i have generated subdomains for my app? I need to have api subdomain to make CORS work. Can i do it on railway, or I need to do it with my domain?
From the service, you can select settings, and then generate domain
I did it. I asked wether I can generate subdomains, so i I have backend on api.x.railway.app and frontend on x.railway.app
Oh, my apologies. I misread. Subdomains are not available for the generated domains.
Thank you