# NovaStream # Developed by: urstarkz # Telegram: t.me/urstarkz # Instagram: urstarkz # Website: urstark.is-a.dev # Use an official Node.js runtime as a parent image FROM node:20-bullseye-slim # Install FFmpeg and required dependencies RUN apt-get update && \ apt-get install -y ffmpeg && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # The official Node image already has a user 'node' with UID 1000 USER node ENV HOME=/home/node \ PATH=/home/node/.local/bin:$PATH # Set the working directory in the container WORKDIR $HOME/app # Copy package.json and package-lock.json with correct permissions COPY --chown=node package*.json ./ # Install dependencies RUN npm install # Copy the rest of the application code with correct permissions COPY --chown=node . . # Build the frontend (Vite) RUN npm run build # Expose the port the app runs on (Hugging Face Spaces uses port 7860 by default) EXPOSE 7860 # Define environment variable for the port ENV PORT=7860 # Start the Node.js server CMD ["node", "server.cjs"]