1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00
.profile/Dockerfile

22 lines
762 B
Docker
Raw Normal View History

2023-04-02 22:44:09 +02:00
FROM node:18.15.0 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 ./
2021-12-04 15:52:51 +01:00
RUN npm install
2021-04-18 01:56:23 +02:00
2023-04-02 22:44:09 +02:00
FROM node:18.15.0 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 ./ ./
RUN npm run build
2021-06-13 00:30:02 +02:00
2023-01-10 23:56:46 +01:00
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
WORKDIR /usr/src/application
2021-06-13 00:30:02 +02:00
ENV NODE_ENV=production
2022-10-03 20:52:15 +02:00
ENV NEXT_TELEMETRY_DISABLED=1
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
COPY --from=builder /usr/src/application/locales ./locales
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
CMD ["./server.js"]