diff --git a/dockerfile b/dockerfile index 5807c20..f10c6e6 100644 --- a/dockerfile +++ b/dockerfile @@ -18,8 +18,13 @@ RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi ARG DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres" ENV DATABASE_URL=$DATABASE_URL -# Generate Prisma Client for the Linux environment -RUN npx prisma generate +# 2. Add the Prisma Schema specifically before generating +# This ensures the generator has the latest schema +COPY prisma ./prisma/ + +# 3. Generate Prisma Client +# We use 'pnpm exec' to ensure we use the local version synced with your node_modules +RUN pnpm exec prisma generate # Build NestJS RUN pnpm build