Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Option for storing projects autogenerated metadata in specified place #2913

Open
deflock opened this issue Sep 19, 2021 · 1 comment

Comments

@deflock
Copy link

deflock commented Sep 19, 2021

Summary

I'd like to have such option to specify where I want to store all project-related autogenerated data like .rush/, .heft/, *.log, etc.

My use-case:
In my monorepo I'm launching each project in own separate docker container. For this within a container I have a concept of main project and dependencies projects. Main project is bind mounted as read/write (RW), and dep-projects are bind mounted as read-only (RO). Let's use this projects graph:

 <--- B <----╮
A            D <---╮
 <--- C <----╯     |
       <---------- E

In this case I have 5 docker containers:

  1. Container A has only main project A (RW) and no dep-projects (RO).
  2. Container B has main project B (RW) and dep-project A (RO).
  3. Container C has main project C (RW) and dep-project A (RO).
  4. Container D has main project D (RW) and 2 dep-projects B and C (RO).
  5. Container E has main project E (RW) and 2 dep-projects D and C (RO).

In each container I'm running rush install and it requires:

  1. All projects (package.json) from rush.json (even if I don't need some of them, I guess this has own tracking issue).
  2. Writeable <project>/.rush/ directory.

To solve the first issue in every container for each project except main I'm bind mounting package.json.

To solve the second issue in every container for each project except main I'm creating writeable volume only for these .rush/ directories. And even container A with no deps has 4 such volumes, just because rush install for some reason requires this.

I'd like to move all these .rush/ to something already writeable, e.g. to common/temp/projects-metadata/projectA/.rush/.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? -
rushVersion from rush.json? 5.51.1
useWorkspaces from rush.json? true
Operating system? *
Would you consider contributing a PR? No
Node.js version (node -v)? 14

/cc @octogonz

@D4N14L
Copy link
Member

D4N14L commented Sep 23, 2021

This seems like this could be a situation that is solved using rush deploy? We have seen other devs use this tool with Docker with much some success. Here's a link to the documentation: https://rushjs.io/pages/commands/rush_deploy/

How do you work around rush install creating the node_modules folder in the container? We don't have much understanding on Docker here, so a repro to experience the situation ourselves would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Author
Development

No branches or pull requests

2 participants