R
Railway2mo ago
Boxer

What's the best way to start services in a monorepo with a lot of services?

Looking at the docs I see commands like npm run start:backend so how does railway now which service is which? https://docs.railway.app/guides/monorepo#deploying-a-shared-monorepo I have a turborepo with golang services in the following directory structure /root --/services -- (golang services 1 folder each) --/packages --/apps So now I am not sure how to start each monorepo service in each railway service
Railway Docs
Deploying a Monorepo | Railway Docs
Documentation for Railway
Solution:
alright, Dockerfile time
Jump to solution
59 Replies
Percy
Percy2mo ago
Project ID: f78d75b5-8972-4d61-8517-22bbccefb41e
Boxer
Boxer2mo ago
f78d75b5-8972-4d61-8517-22bbccefb41e
Boxer
Boxer2mo ago
Do i need to add each service start command to the root package.json?
No description
Boxer
Boxer2mo ago
@Brody This is what I have: root package.json
"kangiten:start": "pnpm --filter kangiten start"
"kangiten:start": "pnpm --filter kangiten start"
Brody
Brody2mo ago
yes you do, like a start:backend and start:frontend etc
Boxer
Boxer2mo ago
No description
Boxer
Boxer2mo ago
it does fail build though let me run that script for logs
Brody
Brody2mo ago
ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent
ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent
Brody
Brody2mo ago
beat you
Boxer
Boxer2mo ago
dang
Brody
Brody2mo ago
is pnpm-lock.yaml absent?
Boxer
Boxer2mo ago
does the service need to have that? it's a golang app it's in the root
Boxer
Boxer2mo ago
No description
Brody
Brody2mo ago
does the go app need to access code from any other folder?
Want results from more Discord servers?
Add your server