This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/Dockerfile

24 lines
804 B
Docker
Raw Permalink Normal View History

FROM node:20.9.0 AS builder-dependencies
2023-01-11 17:39:09 +01:00
WORKDIR /usr/src/application
COPY ./.npmrc ./
2021-10-24 05:19:39 +02:00
COPY ./package*.json ./
RUN npm clean-install
2021-10-24 05:48:06 +02:00
FROM node:20.9.0 AS builder
2023-01-11 17:39:09 +01:00
WORKDIR /usr/src/application
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
2021-10-24 05:19:39 +02:00
COPY ./ ./
2021-10-24 05:48:06 +02:00
RUN npm run build
2021-10-24 05:19:39 +02:00
FROM gcr.io/distroless/nodejs20-debian12:latest AS runner
2023-01-11 17:39:09 +01:00
WORKDIR /usr/src/application
2021-10-24 05:48:06 +02:00
ENV NODE_ENV=production
2023-08-24 22:24:29 +02:00
ENV HOSTNAME=0.0.0.0
2022-12-13 11:38:24 +01:00
ENV NEXT_TELEMETRY_DISABLED=1
2023-01-11 17:39:09 +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
COPY --from=builder /usr/src/application/locales ./locales
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
CMD ["./server.js"]