Update Dockerfile

This commit is contained in:
Stephanos A.
2026-06-30 00:42:39 +03:00
committed by GitHub
parent 592efd0bf9
commit 9bd7edbd03

View File

@@ -23,10 +23,10 @@ RUN pnpm turbo build --filter="@edr/passenger-api..."
FROM base AS deployer
COPY --from=builder /app/ .
RUN pnpm deploy --filter="@edr/passenger-api" --legacy /deploy
# Copy Prisma schema and generated client to deployment directory
RUN mkdir -p /deploy/node_modules/.prisma /deploy/node_modules/@prisma && \
cp -r node_modules/.prisma/client /deploy/node_modules/.prisma/ 2>/dev/null || true && \
cp -r node_modules/@prisma/client /deploy/node_modules/@prisma/ 2>/dev/null || true
# Copy prisma directory and generate client in deploy location
RUN cp -r apps/edr-passenger-api/prisma /deploy/ && \
cd /deploy && \
npx prisma generate --schema=prisma/schema.prisma
# --- Migration image: built in CI, run as a one-shot `docker run --rm --env-file ...`
# against the real DB, as its own gated step *before* the app image is built/deployed.