Skip to content
This repository was archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
feat: add new pdf generator
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielGuedess committed Jun 23, 2024
1 parent b87599b commit 94d64ce
Show file tree
Hide file tree
Showing 6 changed files with 853 additions and 522 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ tsconfig.build.tsbuildinfo
#genered
src/infra/graphql/prisma-generated/

OR01036030


18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ RUN pnpm fetch --prod

COPY --chown=node:node . .

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*

RUN pnpm install

RUN pnpm prisma generate
Expand All @@ -30,6 +39,15 @@ COPY --chown=node:node --from=development /usr/src/app/node_modules ./node_modul

COPY --chown=node:node . .

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*

ENV NODE_ENV production

RUN pnpm fetch --prod
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"ejs": "^3.1.9",
"graphql": "^16.7.1",
"graphql-upload-minimal": "^1.6.0",
"html-pdf": "^3.0.1",
"passport-jwt": "^4.0.1",
"puppeteer": "^22.12.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^5.0.1",
"rxjs": "^7.8.1",
Expand Down
Loading

0 comments on commit 94d64ce

Please sign in to comment.