# Frontend Production Dockerfile FROM node:18-alpine AS builder # Set working directory WORKDIR /app # Copy package files COPY package*.json yarn.lock ./ # Install dependencies RUN yarn install --frozen-lockfile # Copy source code COPY . . # Build the application RUN yarn build # Production stage FROM nginx:alpine # Copy built assets from builder stage COPY --from=builder /app/dist /usr/share/nginx/html # Copy nginx configuration COPY nginx.conf /etc/nginx/nginx.conf # Expose port EXPOSE 80 # Start nginx CMD ["nginx", "-g", "daemon off;"]