-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: install nodejs into nodejs-prefix, and make it configurable #116
Conversation
looks great! seems embedded npmrc is a bit limited, if you want to change the |
@ije funny you should suggest that, I was was doing that, but I actually have quite a few namespaces I manage via npmrc, and managing via ENV got pretty unwieldy fast. Though if possible, I do like the idea of having the option for embedding with docker build, or use env vars. |
@jimisaacs i prefer use configurable npmrc (path/env) instead of embedded npmrc. |
@ije Ah, maybe I misunderstood what you meant by ENV (i.e. So my problem is, I'm not sure how you configure it like this. I know there's a hierarchy that goes from Is there a way to configure npm to use an |
@ije are you suggesting to have a configurable path to an npmrc that nodejs.go would copy into place at |
Ok last comment before I wait. My server environment is running as a non-provisioned user, but if I literally define That said, that means I can remove the embed portion of this PR, though I'm still wondering what you are thinking. |
i see, then i suggest create a embed npmrc file dynamic in the build script, here is how i enable the china traffic splitting feature: https://github.com/alephjs/esm.sh/blob/9be43ace1f6b4bd1dbd98586d858e47db678fd05/scripts/build.sh#L9 |
but for docker, |
@ije I think I see what you are saying, but because I solved my issue without code changes, I was actually about to remove all things npmrc related from this, and just keep the nodePrefix stuff. Does that sound ok for now? |
si, |
@ije ok, have a look at the new diff when you get a chance |
looks great 👍 |
Because it's easier to manage permissions when everything that is supposed to be owned by the server process is in the same place. Because the nodejs installation doesn't have any clear requirement to be where it is, figured it could be moved to the etc dir.
Also embedded an npmrc to be picked up by the installed nodejs. There isn't any example to override the npmrc to be embedded during the build process, but that's exactly how I plan do to it.