Update Dockerfile

This commit is contained in:
talatops 2026-02-17 23:11:43 +05:00 committed by GitHub
parent 7321b85c00
commit d1a1dfc4f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,13 +7,11 @@ COPY package*.json prisma.config.ts ./
COPY prisma ./prisma COPY prisma ./prisma
# Install ALL dependencies (including devDependencies needed for build) # Install ALL dependencies (including devDependencies needed for build)
RUN npm ci RUN npm ci && npx prisma generate
# Copy application code (includes .env created in CI from EC2_ENV for NEXT_PUBLIC_* at build time) # Copy application code (includes .env created in CI from EC2_ENV for NEXT_PUBLIC_* at build time)
COPY . . COPY . .
# Regenerate Prisma Client with final schema before building Next.js
RUN npx prisma generate
# Build the Next.js application (reads .env and embeds NEXT_PUBLIC_* into the bundle) # Build the Next.js application (reads .env and embeds NEXT_PUBLIC_* into the bundle)
RUN npm run build RUN npm run build