# Use official Node.js image as base FROM node:20-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ python3 \ make \ g++ \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm install # Copy project files COPY . . # Build the application RUN npm run build # Expose the port (HF Spaces will use 7860) EXPOSE 7860 # Set environment variables ENV NODE_ENV=production ENV PORT=7860 # Start the application CMD ["npm", "start"]