From 04c1506cc72f9f606808a7c8c7187b0b0e066b3d Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 29 Oct 2026 17:32:50 +0100 Subject: [PATCH] Dockerfile aktualisiert --- Dockerfile | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6de08c0..1d08a62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,21 @@ -FROM nginx:alpine -COPY index.html /usr/share/nginx/html/index.html \ No newline at end of file +FROM node:22-bookworm-slim AS deps +WORKDIR /app +COPY frontend-starter/package.json frontend-starter/package-lock.json ./ +RUN npm ci + +FROM node:22-bookworm-slim AS build +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY frontend-starter/ ./ +ENV NEXT_TELEMETRY_DISABLED=1 +RUN npm run build + +FROM node:22-bookworm-slim AS run +WORKDIR /app +ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 PORT=3000 HOSTNAME=0.0.0.0 +COPY --from=build /app/.next/standalone ./ +COPY --from=build /app/.next/static ./.next/static +COPY --from=build /app/public ./public +USER node +EXPOSE 3000 +CMD ["node", "server.js"] \ No newline at end of file