Skip to content

Commit

Permalink
⚡️(env) add local node binaries to the path
Browse files Browse the repository at this point in the history
Instead of adding local node binaries to the path only for the
development target, we've decided to make it available for each
edxapp-derived targets. This will ease the later use of paver.
  • Loading branch information
jmaupetit committed Oct 2, 2018
1 parent 0d293ed commit 0b278cc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ COPY ./config /config
RUN ln -sf /config/lms /edx/app/edxapp/edx-platform/lms/envs/fun && \
ln -sf /config/cms /edx/app/edxapp/edx-platform/cms/envs/fun

# Add node_modules/.bin to the PATH so that paver-related commands can execute
# node scripts
ENV PATH="/edx/app/edxapp/edx-platform/node_modules/.bin:${PATH}"

# === BUILDER ===
FROM edxapp as builder
Expand Down Expand Up @@ -91,7 +94,7 @@ RUN pip install --src /usr/local/src -r requirements/edx/base.txt
RUN npm install

# Update assets skipping collectstatic (it should be done during deployment)
RUN PATH=${PWD}/node_modules/.bin:${PATH} NO_PREREQ_INSTALL=1 \
RUN NO_PREREQ_INSTALL=1 \
paver update_assets --settings=fun.docker_build_production --skip-collect

# FIXME: we also copy /edx/app/edxapp/staticfiles/webpack-stats.json and
Expand Down Expand Up @@ -147,10 +150,6 @@ RUN bash -c "source /edx/app/edxapp/venv/bin/activate && \
pip install --no-cache-dir -r requirements/edx/testing.txt && \
pip install --no-cache-dir -r requirements/edx/development.txt"

# Add node_modules/.bin to the PATH so that paver-related commands can execute
# node scripts
ENV PATH="/edx/app/edxapp/edx-platform/node_modules/.bin:${PATH}"

ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]


Expand Down

0 comments on commit 0b278cc

Please sign in to comment.