Files
ShopSolution-frontend/Dockerfile
Tizian.Breuch c0c6d74189 df
2025-10-09 16:42:01 +02:00

18 lines
400 B
Docker

# Dockerfile
# --- Stufe 1: Bau-Umgebung ("builder") ---
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
RUN ls -la
# --- Stufe 2: Produktions-Umgebung ("runner") ---
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.output .
EXPOSE 3001
CMD [ "node", "browser/index.mjs" ]