This commit is contained in:
Torsten Simon 2025-04-29 20:49:30 +02:00
parent def118101d
commit 633c6842b7
3 changed files with 53 additions and 0 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
# Schritt 1: Build
FROM node:20 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Schritt 2: Produktionsimage
FROM node:20
WORKDIR /app
COPY --from=build /app ./
# RUN npm prune --production
EXPOSE 4173
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0"]