Fix Docker build (#2815)

Close #2814
This commit is contained in:
Paul Melnikow
2019-01-20 15:01:07 -05:00
committed by GitHub
parent 7789e80fe5
commit a8e27d139d
3 changed files with 9 additions and 8 deletions

View File

@@ -8,14 +8,18 @@ WORKDIR /usr/src/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/
COPY package.json package-lock.json /usr/src/app/
# Without the gh-badges package.json and CLI script in place, `npm install` will fail.
COPY gh-badges /usr/src/app/gh-badges/
RUN npm install
COPY . /usr/src/app
RUN npm run build
RUN npm prune --production
RUN npm cache clean --force
# Do we need to list the environment variables here?
node server
CMD node server
EXPOSE 80