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

Relative URL Does Not Work If There Is No Access to NPM Registry #2975

Open
shplishka opened this issue Jul 24, 2024 · 1 comment
Open

Relative URL Does Not Work If There Is No Access to NPM Registry #2975

shplishka opened this issue Jul 24, 2024 · 1 comment

Comments

@shplishka
Copy link

shplishka commented Jul 24, 2024

When I use GITLAB_RELATIVE_URL_ROOT It reinstalls all the Node modules (Link to Code).

However, when running this in an airgapped environment without access to the NPM registry, it gets stuck because it cannot find the modules to install.

Steps to Reproduce:
Set up an airgapped environment without NPM registry access.
Use the GITLAB_RELATIVE_URL_ROOT at the specified location in the code.

Expected Behavior
The Node modules should not attempt to reinstall, or there should be an alternative method to handle this in an airgapped environment.

Actual Behavior:
The process gets stuck and cannot find the modules to install.

Is there a workaround or an alternative approach to handle this situation in an airgapped environment?

link to another issue where i found it - #2964 (comment)

@kkimurak
Copy link
Contributor

One of the major drawbacks would be the large size of the distribution image. So I actually built 2 images - keeping /home/git/gitlab/node_modules or its caches in /home/git/.cache/yarn/* . Here are image sizes comparation. Relative URL works on both tweaked image on VM without internet connection.

node_modules yarn cache image size note
delete delete 3.68GB sameersbn/gitlab:17.2.0
keep delete 5.04GB
delete keep 5.67GB

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

No branches or pull requests

2 participants