Skip to content

Commit

Permalink
Merge pull request #345 from Klimatbyran/staging
Browse files Browse the repository at this point in the history
Downgrade `pdf-to-img` to `4.1.1` in production
  • Loading branch information
irony authored Nov 28, 2024
2 parents cc88726 + 71cd548 commit 9133a98
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ghcr.io/klimatbyran/garbo-base:main
COPY package*.json /app/
COPY prisma /app/
WORKDIR /app
RUN npm install --omit=dev
RUN npm ci --omit=dev
RUN npx prisma generate

COPY . /app
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ RUN apk add --no-cache \
libjpeg-turbo-dev

COPY package*.json /app/
COPY prisma /app/
WORKDIR /app
RUN npm install --omit=dev
RUN npm ci --omit=dev
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"express": "^5.0.1",
"jest": "^29.7.0",
"openai": "^4.73.1",
"pdf-to-img": "^4.3.0",
"pdf-to-img": "4.1.1",
"pino-http": "^10.3.0",
"prisma-zod-generator": "^0.8.13",
"sharp": "^0.33.5",
Expand Down
3 changes: 0 additions & 3 deletions src/lib/pdfTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import { writeFile } from 'fs/promises'
async function getPngsFromPdfPage(stream: Buffer) {
const pages = await pdf(stream, {
scale: 2,
renderParams: {
background: '#ffffff',
},
})
return pages
}
Expand Down

0 comments on commit 9133a98

Please sign in to comment.