Simplify Dockerfile by using pre-built tinypdf-plus
The tinypdf-plus package now includes pre-built dist files. Removed bun installation and build step from Dockerfile. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
80a1d87cac
commit
5aed125a60
2 changed files with 3 additions and 13 deletions
|
|
@ -1,11 +1,7 @@
|
|||
FROM node:20-alpine AS builder
|
||||
|
||||
# Install OpenSSL, Git, and Bash
|
||||
RUN apk add --no-cache openssl git bash curl
|
||||
|
||||
# Install Bun for tinypdf-plus build
|
||||
RUN curl -fsSL https://bun.sh/install | bash && \
|
||||
/root/.bun/bin/bun --version
|
||||
# Install OpenSSL and Git for Prisma and GitHub dependencies
|
||||
RUN apk add --no-cache openssl git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -17,11 +13,6 @@ COPY prisma ./prisma/
|
|||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Build tinypdf-plus package (add bun to PATH)
|
||||
RUN cd node_modules/tinypdf-plus && \
|
||||
PATH=/root/.bun/bin:$PATH /root/.bun/bin/bun run build || \
|
||||
(echo "tinypdf-plus build failed" && exit 1)
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
"lint": "eslint src/**/*.ts",
|
||||
"seed": "npx prisma db seed",
|
||||
"seed:demo": "node prisma/seed-demo.js",
|
||||
"seed:all": "npx prisma db seed && node prisma/seed-demo.js",
|
||||
"postinstall": "cd node_modules/tinypdf-plus && npm run build || true"
|
||||
"seed:all": "npx prisma db seed && node prisma/seed-demo.js"
|
||||
},
|
||||
"prisma": {
|
||||
"seed": "node dist/prisma/seed.js"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue