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
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
# Install OpenSSL, Git, and Bash
|
# Install OpenSSL and Git for Prisma and GitHub dependencies
|
||||||
RUN apk add --no-cache openssl git bash curl
|
RUN apk add --no-cache openssl git
|
||||||
|
|
||||||
# Install Bun for tinypdf-plus build
|
|
||||||
RUN curl -fsSL https://bun.sh/install | bash && \
|
|
||||||
/root/.bun/bin/bun --version
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -17,11 +13,6 @@ COPY prisma ./prisma/
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
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 source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"seed": "npx prisma db seed",
|
"seed": "npx prisma db seed",
|
||||||
"seed:demo": "node prisma/seed-demo.js",
|
"seed:demo": "node prisma/seed-demo.js",
|
||||||
"seed:all": "npx prisma db seed && 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"
|
|
||||||
},
|
},
|
||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "node dist/prisma/seed.js"
|
"seed": "node dist/prisma/seed.js"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue