This commit is contained in:
1 parent
1664ff9ef7
commit
f64413d7e6
1 file changed
+48
@@ -0,0 +1,48 @@
|
|||||||
|
# --- Merger build stage -------------------------------------------------
|
||||||
|
FROM maven:3.9-eclipse-temurin-21 AS merger-build
|
||||||
|
WORKDIR /build
|
||||||
|
COPY steps/merger/pom.xml .
|
||||||
|
COPY steps/merger/src ./src
|
||||||
|
RUN mvn -q -DskipTests package
|
||||||
|
|
||||||
|
# --- Runtime --------------------------------------------------------------
|
||||||
|
FROM python:3.13-slim
|
||||||
|
|
||||||
|
ENV PYTHONUNBUFFERED=1 \
|
||||||
|
PIP_NO_CACHE_DIR=1
|
||||||
|
|
||||||
|
# ffmpeg (merger), openjdk-21 (merger jar), curl (kubectl download / debugging)
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
ffmpeg curl ca-certificates openjdk-21-jre-headless \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# kubectl — needed by scripts/rescan_nextcloud.sh (occ files:scan via kubectl exec)
|
||||||
|
RUN curl -fsSL -o /usr/local/bin/kubectl \
|
||||||
|
"https://dl.k8s.io/release/$(curl -fsSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
|
||||||
|
&& chmod +x /usr/local/bin/kubectl
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install -r requirements.txt deezer-downloader yt-dlp
|
||||||
|
|
||||||
|
COPY app ./app
|
||||||
|
COPY steps/downloader ./steps/downloader
|
||||||
|
COPY scripts ./scripts
|
||||||
|
COPY config.yaml .
|
||||||
|
COPY --from=merger-build /build/target/merger-1.0-SNAPSHOT.jar ./steps/merger/target/merger-1.0-SNAPSHOT.jar
|
||||||
|
|
||||||
|
# yt-dlp path expected by steps/downloader/config_books.ini
|
||||||
|
RUN test -x /usr/local/bin/yt-dlp
|
||||||
|
|
||||||
|
# The Deezer ARL is set from the web UI and injected as DEEZER_COOKIE_ARL;
|
||||||
|
# it is never baked into the image. Data/state lives in /data and /app/data.
|
||||||
|
# docker run ... -v <nextcloud-data>:/data -v <state>:/app/data ...
|
||||||
|
|
||||||
|
VOLUME ["/data", "/app/data"]
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# Note: runs as root because the pipeline needs chown 33:33 on the mounted data
|
||||||
|
# and reads/writes root-owned media paths. Adjust to your deployment if needed.
|
||||||
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||||
Reference in new issue
Block a user