| # Use official Node.js base image | |
| FROM node:18 | |
| # Install FFmpeg and aria2 | |
| RUN apt-get update && apt-get install -y ffmpeg aria2 curl && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy dependencies | |
| COPY package.json ./ | |
| RUN npm install | |
| # Copy project files | |
| COPY . . | |
| # Create downloads directory | |
| RUN mkdir -p /app/downloads && chmod -R 777 /app/downloads | |
| # Expose API port | |
| EXPOSE 7860 | |
| # Start the server | |
| CMD ["node", "server.js"] |