Skip to content

Commit 53779ae

Browse files
committed
fix: resolve prisma build errors and remove arm64 support
- Change Prisma installation strategy: install Prisma packages first with postinstall - This allows Prisma engines to download before other dependencies - Install remaining deps with --ignore-scripts to avoid sharp compilation - Remove ARM64 platform support to fix build issues and improve speed - Verified: local AMD64 build successful (prisma generate works)
1 parent d1981cb commit 53779ae

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
7171
tags: ${{ steps.meta.outputs.tags }}
7272
labels: ${{ steps.meta.outputs.labels }}
73-
platforms: linux/amd64,linux/arm64
73+
platforms: linux/amd64
7474
cache-from: type=gha
7575
cache-to: type=gha,mode=max
7676
build-args: |

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ COPY pnpm-workspace.yaml pnpm-lock.yaml package.json* /app/
3636
COPY main/package.json /app/main/
3737
COPY web/package.json /app/web/
3838

39-
# 分两步安装以精确控制原生模块编译:
40-
# 1. 先安装所有依赖但跳过所有安装脚本(避免 sharp 尝试源码编译)
41-
# 2. 然后递归重新编译必需的原生模块(-r 确保在所有 workspace 中执行)
42-
RUN pnpm install --frozen-lockfile --shamefully-hoist --ignore-scripts && \
43-
pnpm -r rebuild better-sqlite3 silk-sdk && \
44-
pnpm -r rebuild @prisma/engines
39+
# 三步安装策略:
40+
# 1. 先安装 Prisma 相关包并运行 postinstall(下载引擎)
41+
# 2. 再安装其他依赖并跳过脚本(避免 sharp 尝试源码编译)
42+
# 3. 最后重新编译必需的原生模块
43+
RUN pnpm install --filter=prisma --filter=@prisma/client --filter=@prisma/engines --frozen-lockfile --shamefully-hoist && \
44+
pnpm install --frozen-lockfile --shamefully-hoist --ignore-scripts && \
45+
pnpm -r rebuild better-sqlite3 silk-sdk
4546

4647
# 源码构建
4748
COPY main/ /app/main/

0 commit comments

Comments
 (0)