Merge pull request #360 from Tria-plc/alpha

fix(passenger-api): ensure Prisma client is properly copied to runtim…
This commit is contained in:
Stephanos A.
2026-06-30 00:17:57 +03:00
committed by GitHub

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
RUN if [ -d node_modules/.prisma ]; then \
mkdir -p /deploy/node_modules && \
cp -r node_modules/.prisma /deploy/node_modules/.prisma; \
fi
# 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
# --- 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.
@@ -48,7 +48,7 @@ ENV NODE_ENV=production
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 --ingroup nodejs nestjs
COPY --from=deployer --chown=nestjs:nodejs /deploy .
COPY --from=deployer --chown=nestjs:nodejs /deploy .\
USER nestjs
EXPOSE 4000
CMD ["node", "dist/main.js"]