This repository was archived by the owner on Aug 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.34 KB
/
Copy pathDockerfile
File metadata and controls
42 lines (34 loc) · 1.34 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
32
33
34
35
36
37
38
39
40
41
42
# syntax=docker/dockerfile:1
FROM python:3.11-slim
ARG APP_VERSION=dev
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
OUTPUT_DIR=/data \
PORT=8080 \
PSTREAMREC_DNS_CACHE=false \
APP_VERSION=${APP_VERSION}
# Install ffmpeg, optional local DNS cache support, and build dependencies for native packages (psutil on arm64)
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg ca-certificates dnsmasq-base gcc python3-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install dependencies and the Chromium runtime used by protected providers.
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt && \
python -m playwright install --with-deps chromium && \
apt-get purge -y --auto-remove gcc python3-dev && \
rm -rf /var/lib/apt/lists/*
# Copy source
COPY app ./app
COPY static ./static
COPY README.md ./
COPY docker/entrypoint.sh /usr/local/bin/pstreamrec-entrypoint
RUN chmod +x /usr/local/bin/pstreamrec-entrypoint && \
test -x /usr/local/bin/pstreamrec-entrypoint && \
PSTREAMREC_ENTRYPOINT_TESTING=1 /usr/local/bin/pstreamrec-entrypoint
# Create data volume for recordings
VOLUME ["/data"]
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/pstreamrec-entrypoint"]
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT} --proxy-headers"]