Skip to content

Commit

Permalink
portal: switch to yarn for node packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 9, 2021
1 parent fea3834 commit 3460aa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mpcontribs-portal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ FROM materialsproject/devops:python-3.91.2 as base
FROM node:15.8.0-slim as node

FROM node as webpack-deps
RUN apt-get update && apt-get install -y --no-install-recommends git && apt-get clean
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl gnupg ca-certificates apt-transport-https \
&& apt-get clean
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y --no-install-recommends yarn
ENV NODE_ENV production
WORKDIR /app
COPY package.json .
RUN npm install && npm prune --production
RUN yarn install --production

FROM node as webpack
ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion mpcontribs-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"intro.js": "^3.2.1",
"ion-rangeslider": "^2.3.1",
"jquery": "^3.5.1",
"jquery-form": "github:tschaume/form#master",
"jquery-form": "tschaume/form",
"jquery-simulate": "^1.0.2",
"jquery-validation": "^1.19.3",
"js-sha1": "^0.6.0",
Expand Down

0 comments on commit 3460aa4

Please sign in to comment.