fix: copy root node_modules to runner stage in backend Dockerfile
pnpm hoists workspace dependencies to the root node_modules. Without copying it, modules like pg are not found at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,8 @@ WORKDIR /home/node/app
|
||||
|
||||
RUN mkdir -p packages/backend
|
||||
|
||||
COPY --from=builder --chown=node:node /app/node_modules ./node_modules
|
||||
COPY --from=builder --chown=node:node /app/package.json ./package.json
|
||||
COPY --from=builder --chown=node:node /app/packages/backend/dist ./packages/backend/dist
|
||||
COPY --from=builder --chown=node:node /app/packages/backend/node_modules ./packages/backend/node_modules
|
||||
COPY --from=builder --chown=node:node /app/packages/backend/package.json ./packages/backend/package.json
|
||||
|
||||
Reference in New Issue
Block a user