fix: pdf printing with puppeteer

This commit is contained in:
Julian Krauser 2024-12-21 10:18:07 +01:00
parent 4385b6dc34
commit 98477eafde
6 changed files with 1023 additions and 733 deletions

View file

@ -1,9 +1,19 @@
FROM node:18-alpine AS build
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
WORKDIR /app
COPY package*.json ./
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
RUN npm install
COPY . /app
@ -12,8 +22,21 @@ RUN npm run build
FROM node:18-alpine AS prod
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
WORKDIR /app
RUN mkdir -p /app/export
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
COPY --from=build /app/src/templates /app/src/templates
COPY --from=build /app/dist /app/dist
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/package.json /app/package.json