33 lines
589 B
Docker
33 lines
589 B
Docker
FROM python:3.14-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
tzdata \
|
|
xvfb \
|
|
xauth \
|
|
ca-certificates \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY pyproject.toml uv.lock /app/
|
|
RUN pip install --no-cache-dir uv
|
|
RUN uv sync --frozen --no-dev
|
|
RUN /app/.venv/bin/python -m playwright install --with-deps chromium
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
COPY src .
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PORT=80
|
|
ENV DATA_DIR=/data
|
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
|
|
VOLUME ["/data"]
|
|
|
|
EXPOSE 80
|
|
|
|
STOPSIGNAL SIGINT
|
|
|
|
CMD ["/entrypoint.sh"]
|