mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-02 07:59:31 +08:00
fix: use local prisma cli in docker runner stage to fix WASM file not found error
This commit is contained in:
@@ -46,8 +46,10 @@ RUN apk add --no-cache su-exec openssl \
|
||||
&& addgroup --system --gid 1001 nodejs \
|
||||
&& adduser --system --uid 1001 nextjs
|
||||
|
||||
# Install Prisma CLI globally (same version as project)
|
||||
RUN npm install -g prisma@5.22.0
|
||||
# Copy Prisma CLI and engine files from builder
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/.prisma ./node_modules/.prisma
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/prisma ./node_modules/prisma
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/@prisma ./node_modules/@prisma
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ set -e
|
||||
SOURCE_DB="/app/prisma/dev.db"
|
||||
TARGET_DB="/app/data/dev.db"
|
||||
SEED_MARKER="/app/data/.seed_completed"
|
||||
# Use globally installed Prisma CLI
|
||||
PRISMA_BIN="prisma"
|
||||
# Use local Prisma CLI from node_modules
|
||||
PRISMA_BIN="node /app/node_modules/prisma/build/index.js"
|
||||
|
||||
# Fix permissions for data and config directories
|
||||
chown -R nextjs:nodejs /app/data /app/config
|
||||
|
||||
Reference in New Issue
Block a user