mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-09-24 20:30:31 +01:00
43 lines
1.1 KiB
Docker
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"] |