feat: add multi-stage Docker build with Nginx

This commit is contained in:
2026-03-11 14:57:21 +01:00
parent 5a14c7ac4c
commit 9c4bce0473
3 changed files with 41 additions and 0 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Runtime stage
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]