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 25d571e commit 5049621
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +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
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/config ./config

# 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

# Instalar e gerar Prisma client na imagem de produção
RUN cd apps/api && \
pnpm add @prisma/[email protected] && \
pnpm prisma generate
# Instalar apenas as dependências de produção
RUN pnpm install --prod --frozen-lockfile

USER appuser

Expand Down

0 comments on commit 5049621

Please sign in to comment.