FROM python:3.11-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ curl \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY . . # Create downloads directory with proper permissions RUN mkdir -p static/downloads && chmod 777 static/downloads # Expose port EXPOSE 5000 # Run the application CMD ["python", "app.py"]