29 lines
542 B
Docker
29 lines
542 B
Docker
# ©AngelaMos | 2025
|
|
# Production Vite Dockerfile
|
|
# Multi-stage: build with node, serve with nginx
|
|
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package*.json ./
|
|
|
|
RUN npm ci
|
|
|
|
COPY frontend/ .
|
|
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
COPY conf/nginx/prod.nginx /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --quiet --tries=1 --spider http://localhost/health || exit 1
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|