Skip to content

Commit

Permalink
Install js-wacz separately, so that worker minions don't get all the …
Browse files Browse the repository at this point in the history
…frontend deps too.
  • Loading branch information
rebeccacremona committed Apr 10, 2024
1 parent 1e4c6cf commit d234f71
Show file tree
Hide file tree
Showing 8 changed files with 1,451 additions and 1,248 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
!perma_web/perma-warcprox-ca.pem
!perma_web/lil-archive-keyring.gpg
!playwright/requirements.txt
!services/js-wacz/package.json
!services/js-wacz/package-lock.json
11 changes: 11 additions & 0 deletions perma_web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,24 @@ RUN apt-get update \
# node.js
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs=20.12.0-1nodesource1

#
# npm
#

# frontend requirements
COPY perma_web/package.json /perma/perma_web
COPY perma_web/npm-shrinkwrap.json /perma/perma_web
RUN npm install \
&& rm package.json \
&& rm npm-shrinkwrap.json

# worker requirements
COPY services/js-wacz/package.json /perma/services/js-wacz/package.json
COPY services/js-wacz/package-lock.json /perma/services/js-wacz/package-lock.json
RUN npm install --prefix /perma/services/js-wacz/ \
&& rm /perma/services/js-wacz/package.json \
&& rm /perma/services/js-wacz/package-lock.json

# python requirements
COPY perma_web/requirements.txt /perma/perma_web
RUN python3 -m pip install -r /perma/perma_web/requirements.txt \
Expand Down
Loading

0 comments on commit d234f71

Please sign in to comment.