build update

This commit is contained in:
2026-01-21 15:19:35 +05:00
parent dfefd6ff89
commit 5ac3e8bec4
3 changed files with 66 additions and 3 deletions
+20 -2
View File
@@ -1,10 +1,28 @@
# Build stage - compile the React/Vite app
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files first for better caching
COPY frontend-react/package*.json ./
# Install dependencies
RUN npm ci
# Copy source files
COPY frontend-react/ ./
# Build the production bundle
RUN npm run build
# Production stage - serve with Nginx
FROM nginx:alpine
# Copy custom nginx configuration
COPY .build/prod/nginx.conf /etc/nginx/nginx.conf
# Copy static frontend files
COPY Frontend/ /usr/share/nginx/html/
# Copy built React app from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html/
# Expose port 80
EXPOSE 80