Disk space question
Let's say I have a shared monorepo and my build process for a service is like this:
Given:
-I'm using Docker
-I only have one package.json in the entire repo:
-I have multiple apps in this repo
1. At root install monorepo deps
2. At root, use deps from #1 to build the appropriate project
3. Deploy/Start the project
Problem: Won't all these services repeat the bloat of the node_modules sitting at the monorepo root?
14 Replies
Project ID:
N/A
N/A
You might find these helpful:
- Trouble deploying monorepo app
- Turborepo monorepo setup
- Deploying Monorepo Applications
⚠️ experimental feature
I'm pretty sure that your node_modules will be repeated in each service, but I honestly wouldn't be worried about hitting storage quotas.
Can you explain why not to be worried? My node modules is 1GB atm and it will likely increase
Oh, that's bigger than I expected. If you're on the free plan, then I might suggest trying PNPM to decrease disk usage (if you're not already using it). If you're on the dev plan, though, I still wouldn't worry, since you get 100GB of disk space.
I might have to trim some deps. I'm on the dev plan and I will probably end up moving to the Team plan (having a hard time finding the pricing rn).
If I somehow in the future end up maxing the Team (1TB?) storage quota, is it possible to increase it?
---
Also, I was wondering worst case scenario if I should just (at build time) inject a project's package.json + install its node_modules and delete the node-nodules at the root of the monorepo afterward
I don't know about the team plan, I'm just a Railway user. PNPM should take care of minimizing duplication to some degree, though.
Thanks for helping. Is there any way I can talk to an employee who might confirm?
Ah, I see the Team plan has Dedicated support
I also sent a message in #🎤|chit-chat, hopefully somebody will see it.
don’t worry about disk usage
The limit is a soft limit
we’ll reach out to you if it becomes a problem
Awesome. Thank you 🙂