build(moritzgrafde): simplify Dockerfile to serve pre-built static assets

Remove multi-stage Node.js build from the Dockerfile and copy pre-built dist assets directly into the nginx:alpine runtime image.
This commit is contained in:
Moritz Graf
2026-09-27 21:26:54 +02:00
parent c9e4ba519a
commit caf2c07565
+1 -15
View File
@@ -1,19 +1,5 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
# Copy dependency definitions and install
COPY package*.json ./
RUN npm ci
# Copy source files and compile static bundle
COPY . .
RUN npm run build
# Production runtime stage
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
COPY dist/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]