# Use official Node.js 18 FROM node:18 AS builder # Set working directory WORKDIR /app # Copy frontend files COPY frontend/ /app/ # Install dependencies and build RUN npm install && npm run build # Use Nginx to serve the build FROM nginx:alpine COPY --from=builder /app/build /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf # Expose port EXPOSE 8000 # Start Nginx CMD ["nginx", "-g", "daemon off;"]