Update Dockerfile
This commit is contained in:
parent
7321b85c00
commit
d1a1dfc4f5
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user