Revert "fix: use install.sh script to configure pnpm build dependencies"

This reverts commit 16e6c9e8c4.
This commit is contained in:
2026-05-19 17:38:01 +08:00
parent 16e6c9e8c4
commit fcda313388
2 changed files with 6 additions and 13 deletions

View File

@@ -6,9 +6,12 @@ WORKDIR /app
# 允许所有包的 postinstall 脚本Prisma/esbuild 需要) # 允许所有包的 postinstall 脚本Prisma/esbuild 需要)
ENV NPM_CONFIG_IGNORE_SCRIPTS=false ENV NPM_CONFIG_IGNORE_SCRIPTS=false
# 复制依赖和安装脚本 # 复制依赖文件
COPY package.json pnpm-lock.yaml install.sh ./ COPY package.json pnpm-lock.yaml ./
RUN chmod +x install.sh && ./install.sh COPY .npmrc ./
# 安装依赖pnpm 会读取 .npmrc 中的 onlyBuiltDependencies
RUN corepack enable && pnpm install --frozen-lockfile --config.onlyBuiltDependencies="@prisma/client,@prisma/engines,esbuild,prisma"
# 复制 Prisma schema 并生成客户端 # 复制 Prisma schema 并生成客户端
COPY prisma/ ./prisma/ COPY prisma/ ./prisma/

View File

@@ -1,10 +0,0 @@
#!/bin/sh
set -e
corepack enable
# 设置 pnpm 允许运行 postinstall 脚本的包
pnpm config set onlyBuiltDependencies "@prisma/client @prisma/engines esbuild prisma"
# 安装依赖
pnpm install --frozen-lockfile