feat(api): Add pdfkit to requirements, wkhtml2pdf to Dockerfile
This commit is contained in:
+13
-3
@@ -13,13 +13,23 @@ FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install git
|
||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
||||
# Install git, wkhtmltopdf (https://raw.githubusercontent.com/JazzCore/python-pdfkit/b7bf798b946fa5655f8e82f0d80dec6b6b13d414/ci/before-script.sh)
|
||||
RUN apt update
|
||||
|
||||
RUN apt install -y git
|
||||
|
||||
ENV WKHTML2PDF_VERSION='0.12.6-1'
|
||||
RUN apt install -y build-essential xorg libssl-dev libxrender-dev wget
|
||||
RUN wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTML2PDF_VERSION}/wkhtmltox_${WKHTML2PDF_VERSION}.bionic_amd64.deb"
|
||||
RUN sudo apt install -y ./wkhtmltox_${WKHTML2PDF_VERSION}.bionic_amd64.deb
|
||||
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# --- #
|
||||
|
||||
COPY src/api/requirements.txt requirements.txt
|
||||
RUN pip3 install -r requirements.txt
|
||||
COPY --from=0 /build/build /app/build
|
||||
# COPY src/api/src/.env .env
|
||||
COPY src/api/src .
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user