1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 14:51:30 +01:00
.profile/Dockerfile

24 lines
785 B
Docker
Raw Normal View History

FROM node:16.4.2 AS dependencies
WORKDIR /usr/src/app
2021-06-13 00:30:02 +02:00
COPY ./package*.json ./
RUN npm clean-install
2021-04-18 01:56:23 +02:00
FROM node:16.4.2 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
RUN npm run build
2021-06-13 00:30:02 +02:00
FROM node:16.4.2 AS runner
2021-06-13 00:30:02 +02:00
WORKDIR /usr/src/app
ENV NODE_ENV=production
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
COPY --from=builder /usr/src/app/public ./public
COPY --from=builder /usr/src/app/.next ./.next
COPY --from=builder /usr/src/app/i18n.json ./i18n.json
COPY --from=builder /usr/src/app/locales ./locales
COPY --from=builder /usr/src/app/pages ./pages
COPY --from=builder /usr/src/app/node_modules ./node_modules
RUN npx next telemetry disable
CMD ["node_modules/.bin/next", "start", "--port", "${PORT}"]