wrolpi/docker/api/Dockerfile
Roland aefc7b1def
Add Docs module for searching and organizing PDFs and EPUBs
Create a new Docs module that consolidates PDF and eBook handling into a
unified system with subjects and authors support. This replaces the
separate PDF/eBook modelers with a single Doc model backed by an
alembic migration (rename ebook to doc).

Key changes:
- New modules/docs package with models, API, extractors, and lib
- Subject and author metadata extraction with case-insensitive
  normalization for cleaner PDF metadata
- Frontend Docs pages with AuthorsPage, SubjectsPage using
  CollectionTable, and doc card deletion
- Global search integration for subjects and authors
- Generic collection item count support
- Frontend file card metadata adjusted to match collection sort
- Bump yt-dlp version
2026-03-20 14:17:06 -06:00

34 lines
1.2 KiB
Docker

FROM python:3.11-bookworm
ENV DOCKER=true
WORKDIR /opt/wrolpi
# Update dependencies for the services install.
RUN apt-get update && apt-get install -y ffmpeg catdoc sysstat aria2 iputils-ping unrar-free unzip
RUN ffmpeg -version
# Install Deno runtime for yt-dlp
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "aarch64" ]; then DENO_ARCH="aarch64-unknown-linux-gnu"; \
elif [ "$ARCH" = "x86_64" ]; then DENO_ARCH="x86_64-unknown-linux-gnu"; \
else echo "Unsupported architecture: $ARCH" && exit 1; fi && \
curl -fsSL "https://github.com/denoland/deno/releases/download/v2.2.4/deno-${DENO_ARCH}.zip" -o /tmp/deno.zip \
&& unzip /tmp/deno.zip -d /usr/local/bin/ \
&& chmod +x /usr/local/bin/deno \
&& rm /tmp/deno.zip \
&& deno --version
# yt-dlp needs cache directory
RUN mkdir /.cache && chown -R 1000:1000 /.cache
# Install dependencies.
COPY requirements.txt /opt/wrolpi/requirements.txt
RUN pip3 install -r /opt/wrolpi/requirements.txt
# Install WROLPi.
COPY main.py /opt/wrolpi/
COPY wrolpi /opt/wrolpi/wrolpi
COPY modules /opt/wrolpi/modules
ENTRYPOINT [ "python3", "/opt/wrolpi/main.py"]
# Log level controlled by LOG_LEVEL env var or wrolpi.yaml config (default: info)
CMD ["api", "--host", "0.0.0.0"]