# Use Node.js 20 based on Debian Bullseye (more stable DNS than slim/alpine) FROM node:20-bullseye # Set environment to production ENV NODE_ENV=production # Set working directory WORKDIR /app # Copy package.json and package-lock.json COPY package*.json ./ # Install dependencies --omit=dev (production only) RUN npm install --omit=dev # Copy the rest of the application code COPY . . # Hugging Face Spaces expects port 7860 EXPOSE 7860 # Default environment port if not provided ENV PORT=7860 # Command to run the application CMD ["npm", "start"]