-
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
7e8440a
commit b4dae51
Showing
1 changed file
with
10 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -6,6 +6,9 @@ ARG DATABASE_URL | |
# Passar o build argument para variável de ambiente | ||
ENV DATABASE_URL=${DATABASE_URL} | ||
|
||
# Instalar OpenSSL e outras dependências necessárias | ||
RUN apk add --no-cache openssl openssl-dev | ||
|
||
WORKDIR /app | ||
|
||
# Instalar pnpm | ||
|
@@ -26,8 +29,11 @@ COPY apps/api/ ./apps/api/ | |
# Instalar dependências | ||
RUN pnpm install --frozen-lockfile | ||
|
||
# Atualizar @prisma/client para mesma versão do prisma | ||
RUN cd apps/api && pnpm add @prisma/[email protected] | ||
|
||
# Gerar Prisma Client | ||
RUN cd apps/api && pnpm prisma generate && pnpm prisma migrate deploy | ||
RUN cd apps/api && pnpm prisma generate | ||
|
||
# Build | ||
RUN pnpm --filter @chat/api build | ||
|
@@ -37,6 +43,9 @@ FROM node:20-alpine | |
|
||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup | ||
|
||
# Instalar OpenSSL na imagem de produção também | ||
RUN apk add --no-cache openssl | ||
|
||
WORKDIR /app | ||
|
||
RUN corepack enable && corepack prepare pnpm@latest --activate | ||
|