# --- CHANGED: Upgraded to Node 20 to satisfy Next.js requirements --- FROM node:20-alpine WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm install # Copy the rest of the app code COPY . . # Build the Next.js app RUN npm run build # Set the port to 7860 (Required by Hugging Face) ENV PORT=7860 # Expose the port EXPOSE 7860 # Start the application CMD ["npm", "start"]