fix(docker): ship patched dependencies in the runtime image

The runtime stage copied node_modules from the deps stage, but patch-package
runs in the builder stage, so a patched server-side dependency reached the
image unpatched; only the bundled dist carried the fix. Both node_modules
copies now come from builder.

Claude-Session: https://claude.ai/code/session_01VqV56Hez25hTxXH4ipJfzH
This commit is contained in:
Bohdan Triapitsyn
2026-09-05 15:08:15 +03:00
parent 99c9f99a3d
commit f4eaa70eaa
+4 -2
View File
@@ -63,8 +63,10 @@ ENV LANG=C.UTF-8
COPY scripts/docker-entrypoint.sh /home/openchamber/openchamber-entrypoint.sh
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/packages/web/node_modules ./packages/web/node_modules
# From builder, not deps: builder is where patch-package ran, so a patched
# server-side dependency reaches the image instead of only the bundled dist.
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/web/node_modules ./packages/web/node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/packages/web/package.json ./packages/web/package.json
COPY --from=builder /app/packages/web/bin ./packages/web/bin