# Use official Node image FROM node:18 # Set working directory WORKDIR /app # Copy dependency files COPY package*.json ./ # Install dependencies RUN npm install # Copy source code COPY . . # Build the React app (assumes Vite or CRA) RUN npm run build # Install static server RUN npm install -g serve # Expose port 8080 (required by Hugging Face) EXPOSE 8080 # Serve the app from /dist and bind to 0.0.0.0 CMD ["sh", "-c", "serve -s dist -l tcp://0.0.0.0:8080"]