# Use Node.js LTS (alpine for lightweight image) FROM node:20-alpine # Set working directory WORKDIR /app # Copy package.json and package-lock.json COPY package*.json ./ # Install dependencies RUN npm ci # Copy the rest of the application files COPY . . # Build the Vite application RUN npm run build # Expose port 7860 (Hugging Face standard) EXPOSE 7860 # Start the express server CMD ["node", "serve.js"]