6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-05 04:48:00 +00:00

Make it possible to pull nodejs packages from custom npm registry

During an incident at npmjs.org it was extremely difficult to pull
nodejs packages -- so we made it possible to pull from a custom
registry, deployed for instance with Verdaccio (https://verdaccio.org/).
This commit is contained in:
Régis Behmo 2020-04-16 19:22:12 +02:00
parent 38d6644ef2
commit 76d1078382
3 changed files with 20 additions and 1 deletions

View File

@ -2,6 +2,10 @@
Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Improvement] Make it possible to rely on a different npm registry for faster image building
## v3.11.11 (2020-04-15)
- [Bugfix] Make sure all emails (including "password reset") are properly saved to a local file in development mode (#315)

View File

@ -197,6 +197,20 @@ The following sections describe how to modify various aspects of the docker imag
The custom image will be used the next time you run ``tutor local quickstart`` or ``tutor local start``. Do not attempt to run ``tutor local restart``! Restarting will not pick up the new image and will continue to use the old image.
openedx Docker Image build arguments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When building the "openedx" Docker image, it is possible to specify a few `arguments <https://docs.docker.com/engine/reference/builder/#arg>`__:
- ``EDX_PLATFORM_REPOSITORY`` (default: ``"https://github.com/edx/edx-platform.git"``)
- ``EDX_PLATFORM_VERSION`` (default: ``"open-release/ironwood.master"``)
- ``EDX_PLATFORM_VERSION_DATE`` (default: ``"20200227"``)
- ``NPM_REGISTRY`` (default: ``"https://registry.npmjs.org/"``)
These arguments can be specified from the command line, `very much like Docker <https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg>`__. For instance::
tutor images build -a EDX_PLATFORM_VERSION=customsha1 openedx
Adding custom themes
~~~~~~~~~~~~~~~~~~~~

View File

@ -63,8 +63,9 @@ RUN nodeenv /openedx/nodeenv --node=8.9.3 --prebuilt
ENV PATH /openedx/nodeenv/bin:${PATH}
# Install nodejs requirements
ARG NPM_REGISTRY=https://registry.npmjs.org/
RUN npm set progress=false \
&& npm install
&& npm install --verbose --registry=$NPM_REGISTRY
ENV PATH ./node_modules/.bin:${PATH}
# Install private requirements: this is useful for installing custom xblocks.