Skip to content

Commit

Permalink
chore: fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPorfirio01 committed Jan 1, 2025
1 parent c9bab66 commit 25d571e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ COPY --from=builder /app/pnpm-workspace.yaml ./
COPY --from=builder /app/pnpm-lock.yaml ./
COPY --from=builder /app/apps/api/package.json ./apps/api/
COPY --from=builder /app/apps/api/dist ./apps/api/dist

# Copiar node_modules e garantir que o Prisma seja instalado corretamente
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/apps/api/node_modules ./apps/api/node_modules

COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
RUN cd apps/api && pnpm prisma generate

# Instalar e gerar Prisma client na imagem de produção
RUN cd apps/api && \
pnpm add @prisma/[email protected] && \
pnpm prisma generate

USER appuser

Expand Down

0 comments on commit 25d571e

Please sign in to comment.