Files
shelfmark/Dockerfile
T
CaliBrain 5b2b640937 DNS (#108)
This should help fix #106 #103
2025-03-29 03:36:34 -04:00

43 lines
1.1 KiB
Docker

FROM python:3.12-slim
ENV DEBIAN_FRONTEND=noninteractive \
DOCKERMODE=true \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=100 \
NAME=Calibre-Web-Automated-Book-Downloader \
PYTHONPATH=/app \
UID=1000 \
GID=100
# Install minimal dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
curl \
xvfb \
chromium-driver \
dumb-init && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies including playwright
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && \
rm -rf /root/.cache /app/.cache
COPY . .
RUN chmod +x /app/entrypoint.sh && \
# Create necessary directories
mkdir -p /var/log/cwa-book-downloader && \
mkdir -p /cwa-book-ingest
EXPOSE ${FLASK_PORT}
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${FLASK_PORT}/request/api/status || exit 1
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/app/entrypoint.sh"]