ensl_gathers/Dockerfile

28 lines
520 B
Text
Raw Normal View History

FROM bitnami/node:12 AS builder
COPY package*.json /app/
WORKDIR /app
RUN ["npm", "install"]
COPY . /app
2020-10-26 18:58:38 +00:00
RUN npm run compile_production && \
npm prune --production
2020-10-26 18:58:38 +00:00
FROM node:lts-alpine AS production
ENV NODE_ENV="production"
ENV PORT=8000
2020-10-26 18:58:38 +00:00
RUN adduser web --disabled-password
USER web
RUN /bin/mkdir -p /home/web/tmp/public
COPY --chown=web:web --from=builder /app /app
WORKDIR /app
2020-10-26 18:58:38 +00:00
RUN /bin/cp -r ./public /home/web/tmp/public && \
/bin/touch /home/web/tmp/.updatePublic
EXPOSE 8000
CMD ["node", "index.js"]