Add Docker support (Dockerfile, docker-compose.yml, .dockerignore)

This commit is contained in:
2026-07-07 20:52:50 +02:00
parent 52e39ca751
commit bfb7002c4d
3 changed files with 87 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy application files
COPY . .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt 2>/dev/null || pip install --no-cache-dir \
flask \
requests \
gunicorn \
m3u8 \
pypdl \
python-slugify \
yt-dlp \
2>/dev/null || true
# Create downloads directory
RUN mkdir -p /app/downloads /app/cookies
# Expose port
EXPOSE 8770
# Run with gunicorn for production
CMD ["gunicorn", "--bind", "0.0.0.0:8770", "--workers", "2", "--threads", "4", "app:app"]