FROM node:18-alpine WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm install --legacy-peer-deps # Copy all files COPY . . # Build the app RUN npm run build # Expose port 7860 (Hugging Face Spaces default) EXPOSE 7860 # Start the preview server CMD ["npm", "run", "preview", "--", "--port", "7860", "--host", "0.0.0.0"]