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:
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.
Jump to solution
8 Replies
Percy
Percy15mo ago
Project ID: baf32686-aca8-4ef9-8696-294e237d314a
MantisInABox
MantisInABox15mo ago
Maybe this can be of some assistance https://docs.railway.app/deploy/monorepo
Railway Docs
Monorepo Support | Railway Docs
Documentation for Railway
Solution
oskarpuchalski
oskarpuchalski15mo ago
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.
oskarpuchalski
oskarpuchalski15mo ago
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?
MantisInABox
MantisInABox15mo ago
From the service, you can select settings, and then generate domain
oskarpuchalski
oskarpuchalski15mo ago
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
MantisInABox
MantisInABox15mo ago
Oh, my apologies. I misread. Subdomains are not available for the generated domains.
oskarpuchalski
oskarpuchalski15mo ago
Thank you
Want results from more Discord servers?
Add your server