-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 1.02 KB
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
FROM python:3.12-slim
LABEL org.opencontainers.image.title="StreamRec" \
org.opencontainers.image.description="Self-hosted live stream recorder with web UI" \
org.opencontainers.image.source="https://github.com/orhogi/streamerREC" \
org.opencontainers.image.licenses="MIT"
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
curl \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
&& chmod a+rx /usr/local/bin/yt-dlp
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY main.py .
COPY index.html .
RUN mkdir -p /recordings
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
HEALTHCHECK --interval=60s --timeout=5s --start-period=10s --retries=3 \
CMD curl -sf http://localhost:8080/api/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--limit-concurrency", "20", "--timeout-keep-alive", "10"]