2023-08-24 22:38:09 +02:00
|
|
|
FROM node:20.5.1 AS builder-dependencies
|
2023-01-10 23:56:46 +01:00
|
|
|
WORKDIR /usr/src/application
|
2021-06-13 00:30:02 +02:00
|
|
|
COPY ./package*.json ./
|
2023-05-13 19:09:54 +02:00
|
|
|
RUN npm clean-install
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-08-24 22:38:09 +02:00
|
|
|
FROM node:20.5.1 AS builder
|
2023-01-10 23:56:46 +01:00
|
|
|
WORKDIR /usr/src/application
|
|
|
|
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
|
2021-06-13 00:30:02 +02:00
|
|
|
COPY ./ ./
|
2021-05-08 19:52:04 +02:00
|
|
|
RUN npm run build
|
2021-06-13 00:30:02 +02:00
|
|
|
|
2023-07-30 19:03:36 +02:00
|
|
|
FROM gcr.io/distroless/nodejs20-debian11:latest AS runner
|
2023-01-10 23:56:46 +01:00
|
|
|
WORKDIR /usr/src/application
|
2021-06-13 00:30:02 +02:00
|
|
|
ENV NODE_ENV=production
|
2023-08-24 22:38:09 +02:00
|
|
|
ENV HOSTNAME=0.0.0.0
|
2022-10-03 20:52:15 +02:00
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
2023-08-01 19:34:58 +02:00
|
|
|
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
|
2023-01-10 23:56:46 +01:00
|
|
|
COPY --from=builder /usr/src/application/.next/standalone ./
|
|
|
|
COPY --from=builder /usr/src/application/.next/static ./.next/static
|
|
|
|
COPY --from=builder /usr/src/application/public ./public
|
2023-08-01 19:34:58 +02:00
|
|
|
COPY --from=builder /usr/src/application/i18n/translations ./i18n/translations
|
2023-01-10 23:56:46 +01:00
|
|
|
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
|
|
|
|
CMD ["./server.js"]
|