From d8a7bd10f4b0c8f6b1da5798daed6478868f19e3 Mon Sep 17 00:00:00 2001 From: neon <18559658+neonsolstice@users.noreply.github.com> Date: Sat, 11 Jul 2026 19:43:45 +0000 Subject: [PATCH] build(docker): include dependency patches in image builds Copy workspace patch files before frozen installs so pnpm can validate patched dependencies. Permit unused client patches only while deploying the server production bundle. --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c7ec79b09..f19aa1137 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ FROM base AS client-builder WORKDIR /app COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./ +COPY patches/ ./patches/ COPY packages/types/package.json ./packages/types/ COPY client/package.json ./client/ RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \ @@ -22,6 +23,7 @@ FROM base AS server-builder WORKDIR /app COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./ +COPY patches/ ./patches/ COPY packages/types/package.json ./packages/types/ COPY server/package.json ./server/ RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \ @@ -32,7 +34,7 @@ COPY server/ ./server/ RUN pnpm --filter server run build # pnpm deploy prunes to prod deps; dist/ is gitignored so copy it in after. -RUN pnpm --filter server deploy --prod --legacy /deploy +RUN pnpm --config.allow-unused-patches=true --filter server deploy --prod --legacy /deploy RUN cp -r /app/server/dist /deploy/dist RUN mkdir -p /deploy/migrations && cp -r /app/server/src/db/migrations/. /deploy/migrations/