Files
shields/Dockerfile
chris48s 0bcd7eef15 Run on node 12 in production, update test matrix (#5436)
* upgrade node/npm versions in package.json

* delete config for zeit now
zeit now is no more, vercel have decomissioned the now v1 platform

* upgrade to node 12 for (docker) self-hosting users

* update docs

* update test matrix
run tests on node 12 and node 14

* link to nodejs version support docs in package comment
we'll continue to tun the package tests on node 10
while its still maintained and drop in the next
major release

* update depcheck

* remove npm-install job
2020-08-18 19:28:58 +01:00

25 lines
599 B
Docker

FROM node:12-alpine
RUN mkdir -p /usr/src/app
RUN mkdir /usr/src/app/private
WORKDIR /usr/src/app
COPY package.json package-lock.json /usr/src/app/
# Without the badge-maker package.json and CLI script in place, `npm ci` will fail.
COPY badge-maker /usr/src/app/badge-maker/
# We need dev deps to build the front end. We don't need Cypress, though.
RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci
COPY . /usr/src/app
RUN npm run build
RUN npm prune --production
RUN npm cache clean --force
# Run the server using production configs.
ENV NODE_ENV production
CMD node server
EXPOSE 80