2024-08-15 19:56:41 +00:00
|
|
|
FROM mirror.gcr.io/library/node:18-alpine as dev
|
2023-07-29 18:10:00 +00:00
|
|
|
RUN apk add netcat-openbsd
|
|
|
|
|
|
|
|
RUN npm config set update-notifier false
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
COPY src ./
|
|
|
|
|
|
|
|
RUN npm ci --silent
|
|
|
|
RUN npm run compile
|
|
|
|
|
|
|
|
ENTRYPOINT npm run start
|
|
|
|
|
2024-08-15 20:00:19 +00:00
|
|
|
FROM mirror.gcr.io/node:18-alpine AS prod
|
2023-07-29 18:10:00 +00:00
|
|
|
RUN npm config set update-notifier false
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=dev /app/package.json /app/package-lock.json /app/
|
|
|
|
COPY config /app/config
|
|
|
|
COPY --from=dev /app/lib /app/lib
|
2023-07-29 21:15:24 +00:00
|
|
|
COPY --from=dev /app/public /app/public
|
2023-07-29 18:10:00 +00:00
|
|
|
|
|
|
|
RUN npm ci --only=production --silent
|
|
|
|
|
2024-08-15 19:56:41 +00:00
|
|
|
CMD ["npm", "start"]
|