From 34b4c2d6d26c0a40873391d524cd1531736bb9dd Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 23 Jun 2026 00:05:29 -0500 Subject: [PATCH] fix(api): flatten pnpm symlinks with cp -rL for docker COPY --- apps/api/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 1efe460..9404615 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -7,12 +7,13 @@ COPY . . RUN pnpm install --frozen-lockfile 2>/dev/null || pnpm install --no-frozen-lockfile --force RUN pnpm --filter @moraworld/database exec prisma generate && pnpm --filter @moraworld/database build RUN pnpm --filter @moraworld/api build +RUN mkdir /app/flat-node && cp -rL node_modules/. /app/flat-node/ FROM node:22-alpine AS runner WORKDIR /app ENV NODE_ENV=production RUN addgroup -S app && adduser -S app app -COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/flat-node ./node_modules COPY --from=builder /app/apps/api/dist ./dist COPY --from=builder /app/apps/api/package.json ./ COPY --from=builder /app/packages/database ./packages/database