fix: force pnpm rebuild better-sqlite3 for native binding
pnpm install doesn't compile native bindings in Alpine. Explicit rebuild ensures the .node file is generated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,8 @@ RUN apk add --no-cache python3 make g++
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN corepack enable pnpm
|
RUN corepack enable pnpm
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile && pnpm rebuild better-sqlite3
|
||||||
# Verify native binding was built
|
RUN find node_modules -name "better_sqlite3.node" || (echo "FATAL: binding not found" && exit 1)
|
||||||
RUN find node_modules -name "better_sqlite3.node" && echo "--- binding found ---"
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
# Keep only build tools cleanup that won't remove sqlite-libs
|
# Keep only build tools cleanup that won't remove sqlite-libs
|
||||||
|
|||||||
Reference in New Issue
Block a user