Initial commit

This commit is contained in:
2026-02-26 23:58:19 +11:00
commit 97aa3cd19d
43 changed files with 1685 additions and 0 deletions

28
backend/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM python:3.12-slim
# Create a non-root user
RUN addgroup --gid 1000 appgroup && \
adduser --uid 1000 --gid 1000 --disabled-password --gecos "" appuser
WORKDIR /app
# Install system dependencies, primarily ffmpeg which is crucial for yt-dlp to merge formats
# nodejs is required for yt-dlp to solve the YouTube 'n' challenge bot-detection
RUN apt-get update && apt-get install -y \
ffmpeg \
aria2 \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies first (caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=appuser:appgroup . .
# Switch to non-root user
USER appuser
# Command will be overridden by docker-compose for either web or worker
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]