production docker deployment update

This commit is contained in:
Alberto-Audrix committed 2026-09-10 15:44:34 +07:00
1 parent 11b0ca26a5
commit ded52d1ece
12 files changed
+616

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
# Frontend — multi-stage build (Vite + Nginx)
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
ENV VITE_API_BASE=/api/v1
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:80/health || exit 1
CMD ["nginx", "-g", "daemon off;"]