File size: 736 Bytes
c9c1161
 
 
 
 
7bf005b
 
 
c9c1161
 
7bf005b
c9c1161
7bf005b
 
c9c1161
 
 
7bf005b
 
 
 
c9c1161
7bf005b
62ef54b
c9c1161
7bf005b
 
62ef54b
7bf005b
 
 
e634e47
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies (required for yt-dlp and ffmpeg)
RUN apt-get update && apt-get install -y \
    ffmpeg \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY app.py .

# Create directory for cookies
RUN mkdir -p /app/cookies

# Expose port
EXPOSE 7860

# Environment variables
ENV COOKIES_DIR=/app/cookies
ENV PORT=7860
ENV PYTHONUNBUFFERED=1

# Run with gunicorn for production
# CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "--timeout", "120", "app:app"]
CMD ["python", "app.py"]