ensl_gathers/Dockerfile

28 lines
520 B
Text
Raw Permalink Normal View History

2023-03-10 15:43:09 +00:00
FROM bitnami/node:18 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
2023-03-10 15:43:09 +00:00
FROM node:18-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
RUN /bin/cp -r ./public /home/web/tmp/public && \
/bin/touch /home/web/tmp/.updatePublic
EXPOSE 8000
2023-03-05 17:26:13 +00:00
CMD ["node", "index.mjs"]