fix(api): usar pnpm deploy para resolver symlinks rotos de pnpm en runner

This commit is contained in:
Lizandro Guarnizo
2026-06-18 23:06:47 -05:00
parent 596dc18e82
commit 6aa6897f4d
+4 -4
View File
@@ -8,15 +8,15 @@ 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
# pnpm deploy crea un dir autocontenido sin symlinks al store virtual
RUN pnpm --filter @moraworld/api deploy --prod /app/deploy
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup -S app && adduser -S app app
COPY --from=builder /app/apps/api/dist ./dist
COPY --from=builder /app/apps/api/package.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/deploy ./
COPY --from=builder /app/packages/database ./packages/database
USER app
EXPOSE 3001
CMD ["node", "dist/main.js"]
CMD ["node", "dist/main.js"]