mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 04:51:30 +01:00
22 lines
650 B
Docker
22 lines
650 B
Docker
FROM node:16.17.1 AS dependencies
|
|
WORKDIR /usr/src/app
|
|
COPY ./package*.json ./
|
|
RUN npm install
|
|
|
|
FROM node:16.17.1 AS builder
|
|
WORKDIR /usr/src/app
|
|
COPY ./ ./
|
|
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
|
|
RUN npm run build
|
|
|
|
FROM node:16.17.1 AS runner
|
|
WORKDIR /usr/src/app
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
|
COPY --from=builder /usr/src/app/.next/standalone ./
|
|
COPY --from=builder /usr/src/app/.next/static ./.next/static
|
|
COPY --from=builder /usr/src/app/public ./public
|
|
COPY --from=builder /usr/src/app/locales ./locales
|
|
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
|
|
CMD ["node", "server.js"]
|