From 6548d83e1812542aaed25f0e22b4e652ecc754ac Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:24:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(mana-search):=20use=20pnpm?= =?UTF-8?q?=20deploy=20to=20fix=20symlink=20issue=20in=20Docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pnpm creates symlinks in node_modules that point to ../../node_modules/.pnpm/ These symlinks break when only the service node_modules are copied. Using pnpm deploy creates a standalone version with all dependencies copied (no symlinks), which works correctly in Docker. Co-Authored-By: Claude Opus 4.5 --- services/mana-search/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/mana-search/Dockerfile b/services/mana-search/Dockerfile index acbc002ed..36b723a7a 100644 --- a/services/mana-search/Dockerfile +++ b/services/mana-search/Dockerfile @@ -19,11 +19,13 @@ COPY services/mana-search ./services/mana-search WORKDIR /app/services/mana-search RUN pnpm build +# Deploy standalone version (resolves pnpm symlinks) +RUN pnpm deploy --filter @manacore/mana-search --prod /app/deploy + # ================================ # Production Stage # ================================ FROM node:20-alpine AS runner -RUN corepack enable && corepack prepare pnpm@9.15.0 --activate ENV NODE_ENV=production # Create non-root user @@ -33,10 +35,9 @@ USER nestjs WORKDIR /app -# Copy built application +# Copy deployed standalone application (no symlinks) +COPY --from=builder --chown=nestjs:nodejs /app/deploy ./ COPY --from=builder --chown=nestjs:nodejs /app/services/mana-search/dist ./dist -COPY --from=builder --chown=nestjs:nodejs /app/services/mana-search/node_modules ./node_modules -COPY --from=builder --chown=nestjs:nodejs /app/services/mana-search/package.json ./ # Expose port EXPOSE 3021