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

22 lines
650 B
Docker
Raw Normal View History

2022-12-13 11:38:24 +01:00
FROM node:18.12.1 AS dependencies
2021-10-24 05:48:06 +02:00
WORKDIR /usr/src/app
2021-10-24 05:19:39 +02:00
COPY ./package*.json ./
RUN npm install
2021-10-24 05:48:06 +02:00
2022-12-13 11:38:24 +01:00
FROM node:18.12.1 AS builder
2021-10-24 05:48:06 +02:00
WORKDIR /usr/src/app
2021-10-24 05:19:39 +02:00
COPY ./ ./
2021-10-24 05:48:06 +02:00
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
RUN npm run build
2021-10-24 05:19:39 +02:00
2022-12-13 11:38:24 +01:00
FROM node:18.12.1 AS runner
2021-10-24 05:48:06 +02:00
WORKDIR /usr/src/app
ENV NODE_ENV=production
2022-12-13 11:38:24 +01:00
ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=builder /usr/src/app/.next/standalone ./
COPY --from=builder /usr/src/app/.next/static ./.next/static
2021-10-24 05:48:06 +02:00
COPY --from=builder /usr/src/app/public ./public
COPY --from=builder /usr/src/app/locales ./locales
2022-12-13 11:38:24 +01:00
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
CMD ["node", "server.js"]