2022-10-03 20:52:15 +02:00
|
|
|
FROM node:18.11.0 AS dependencies
|
2021-05-08 19:52:04 +02:00
|
|
|
WORKDIR /usr/src/app
|
2021-06-13 00:30:02 +02:00
|
|
|
COPY ./package*.json ./
|
2021-12-04 15:52:51 +01:00
|
|
|
RUN npm install
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2022-10-03 20:52:15 +02:00
|
|
|
FROM node:18.11.0 AS builder
|
2021-06-13 00:30:02 +02:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY ./ ./
|
|
|
|
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
|
2021-05-08 19:52:04 +02:00
|
|
|
RUN npm run build
|
2021-06-13 00:30:02 +02:00
|
|
|
|
2022-10-03 20:52:15 +02:00
|
|
|
FROM node:18.11.0 AS runner
|
2021-06-13 00:30:02 +02:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
ENV NODE_ENV=production
|
2022-10-03 20:52:15 +02:00
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
2022-09-29 19:07:20 +02:00
|
|
|
COPY --from=builder /usr/src/app/.next/standalone ./
|
|
|
|
COPY --from=builder /usr/src/app/.next/static ./.next/static
|
2021-06-13 00:30:02 +02:00
|
|
|
COPY --from=builder /usr/src/app/public ./public
|
|
|
|
COPY --from=builder /usr/src/app/locales ./locales
|
2022-09-29 19:07:20 +02:00
|
|
|
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
|
|
|
|
CMD ["node", "server.js"]
|