FROM node:20-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* # Copy package files COPY package*.json ./ # Install dependencies RUN npm install # Copy application source COPY . . # Build frontend and backend RUN npm run build # Expose Hugging Face default port (7860) EXPOSE 7860 ENV PORT=7860 ENV NODE_ENV=production # Start server CMD ["node", "dist/server.cjs"]