Spaces:
Running
Running
| # Use a Node.js base image | |
| FROM node:20-slim | |
| # Install system dependencies for yt-dlp and ffmpeg | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| ffmpeg \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install yt-dlp binary | |
| RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \ | |
| && chmod a+rx /usr/local/bin/yt-dlp | |
| # Set working directory | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY package*.json ./ | |
| RUN npm install | |
| # Copy application code | |
| COPY . . | |
| # HF Spaces default port is 7860 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Run with tsx to handle your imports/aliases | |
| CMD ["npx", "tsx", "--tsconfig", "jsconfig.json", "backend/server.js"] |