Add WeasyPrint PDF export for markdown files

This commit is contained in:
2026-05-26 21:22:02 -04:00
parent 9776311c20
commit c79202716c
5 changed files with 172 additions and 6 deletions
+6 -1
View File
@@ -3,7 +3,7 @@
FROM python:3.11-slim AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc libffi-dev libc6-dev \
&& apt-get install -y --no-install-recommends gcc libffi-dev libc6-dev libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 shared-mime-info \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
@@ -22,6 +22,11 @@ WORKDIR /app
# Copy installed packages from builder stage
COPY --from=builder /install /usr/local
# WeasyPrint runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 shared-mime-info \
&& rm -rf /var/lib/apt/lists/*
# Copy application code
COPY backend/ ./backend/
COPY frontend/ ./frontend/