# Frontend Build Stage FROM node:18-alpine as build WORKDIR /app # Copy package files COPY package*.json ./ RUN npm install # Copy source code COPY . . # Build the application RUN npm run build # Production Stage FROM nginx:alpine # Copy built application COPY --from=build /app/build /usr/share/nginx/html # Copy nginx configuration COPY nginx.conf /etc/nginx/conf.d/default.conf # Expose port EXPOSE 3000 CMD ["nginx", "-g", "daemon off;"]