-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22009eb
commit 7b2d527
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,18 @@ COPY apps/api/ ./apps/api/ | |
# Instalar dependências | ||
RUN pnpm install --frozen-lockfile | ||
|
||
# Atualizar @prisma/client e instalar prisma CLI | ||
# Instalar dependências e garantir versões compatíveis do Prisma | ||
RUN cd apps/api && \ | ||
pnpm add @prisma/[email protected] && \ | ||
pnpm add -D [email protected] | ||
pnpm add -D [email protected] && \ | ||
pnpm install | ||
|
||
# Gerar Prisma Client e fazer build | ||
# Gerar Prisma Client explicitamente | ||
RUN cd apps/api && \ | ||
pnpm exec prisma generate --schema=./prisma/schema.prisma | ||
|
||
# Build após garantir que o Prisma Client foi gerado | ||
RUN cd apps/api && \ | ||
pnpm exec prisma generate && \ | ||
pnpm build | ||
|
||
# Imagem de produção | ||
|
@@ -78,4 +82,8 @@ HEALTHCHECK --interval=30s --timeout=3s \ | |
CMD wget --no-verbose --tries=1 --spider http://localhost:3333/health || exit 1 | ||
|
||
# Comando de inicialização | ||
CMD ["pnpm", "start"] | ||
CMD ["pnpm", "start"] | ||
|
||
# Garantir que o Prisma Client seja regenerado no ambiente de produção | ||
RUN cd apps/api && \ | ||
pnpm exec prisma generate --schema=./prisma/schema.prisma |