2022-05-21 09:23:55 +02:00
|
|
|
# Our Node base image
|
|
|
|
FROM node:16-alpine3.14 as base
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
RUN chown node:node /usr/src/app
|
|
|
|
|
2022-07-13 14:42:00 +02:00
|
|
|
RUN apk add --no-cache setpriv
|
2022-05-21 09:23:55 +02:00
|
|
|
|
2022-07-13 14:42:00 +02:00
|
|
|
COPY --chown=node:node package*.json ./
|
2022-05-21 09:30:00 +02:00
|
|
|
|
2022-07-04 20:47:25 +02:00
|
|
|
RUN npm ci
|
2022-05-21 09:23:55 +02:00
|
|
|
|
|
|
|
COPY --chown=node:node . .
|
|
|
|
|
2022-09-05 16:51:45 +02:00
|
|
|
RUN npm run build
|
|
|
|
|
2022-05-21 09:23:55 +02:00
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
FROM base AS dev
|
|
|
|
ENV CHOKIDAR_USEPOLLING=true
|
2022-07-13 14:42:00 +02:00
|
|
|
EXPOSE 24678
|
2022-05-21 09:23:55 +02:00
|
|
|
CMD ["npm", "run", "dev"]
|
|
|
|
|
2022-07-13 14:42:00 +02:00
|
|
|
FROM base as prod
|
|
|
|
ENV NODE_ENV=production
|