feat(docker): add Dockerfile, docker-compose and headless fallback for local testing

This commit is contained in:
bart
2026-11-02 21:42:26 +01:00
parent f66f874bae
commit 0aed952728
6 changed files with 156 additions and 12 deletions
+35
View File
@@ -0,0 +1,35 @@
FROM python:3.12-slim-bookworm
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
# Install mpv, ffmpeg and system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
mpv \
ffmpeg \
curl \
ca-certificates \
libgl1 \
libegl1 \
libx11-6 \
libxext6 \
libasound2 \
pulseaudio-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install python dependencies and latest yt-dlp
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt yt-dlp
COPY src/ ./src/
COPY config.example.yaml ./config.example.yaml
# If no config.yaml exists at runtime, fallback to config.example.yaml
RUN cp config.example.yaml config.yaml
EXPOSE 8080 9090 8097
ENTRYPOINT ["python3", "-m", "src.main"]
CMD ["-c", "config.yaml"]