fix: skip buttplug Rust build in backend Dockerfile via --ignore-scripts
Some checks failed
Build and Push Backend Image / build (push) Has been cancelled
Build and Push Frontend Image / build (push) Has been cancelled

Copy all workspace package.json files so pnpm can resolve the lockfile,
but install with --ignore-scripts to prevent buttplug's Rust/WASM build
from running. Only explicitly rebuild argon2 native bindings.
Also restore the missing migrations COPY line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 19:08:48 +01:00
parent 73f7a4f2f0
commit 757bbe9e3b

View File

@@ -9,19 +9,25 @@ RUN npm install -g corepack@latest && corepack enable
WORKDIR /app WORKDIR /app
# Copy all package manifests so pnpm can resolve the workspace lockfile,
# but use --ignore-scripts to skip buttplug's Rust/WASM build entirely.
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml ./ COPY pnpm-workspace.yaml package.json pnpm-lock.yaml ./
COPY packages/backend/package.json ./packages/backend/package.json COPY packages/backend/package.json ./packages/backend/package.json
COPY packages/frontend/package.json ./packages/frontend/package.json
COPY packages/buttplug/package.json ./packages/buttplug/package.json
RUN pnpm install --frozen-lockfile --filter @sexy.pivoine.art/backend RUN pnpm install --frozen-lockfile --filter @sexy.pivoine.art/backend --ignore-scripts
# Rebuild argon2 native bindings (pnpm v10 build approval bypassed explicitly) # Only rebuild the native argon2 binding — not buttplug or anything else
RUN pnpm rebuild argon2 RUN pnpm rebuild argon2
COPY packages/backend ./packages/backend COPY packages/backend ./packages/backend
RUN pnpm --filter @sexy.pivoine.art/backend build RUN pnpm --filter @sexy.pivoine.art/backend build
RUN pnpm install -rP --filter @sexy.pivoine.art/backend RUN pnpm install --frozen-lockfile --filter @sexy.pivoine.art/backend --prod --ignore-scripts
RUN pnpm rebuild argon2
# ============================================================================ # ============================================================================
# Runner stage # Runner stage