Add Prisma generation and schema support to Dockerfile
This commit is contained in:
@@ -8,7 +8,9 @@ WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY prisma ./prisma/
|
||||
RUN npm ci --legacy-peer-deps
|
||||
RUN npx prisma generate
|
||||
|
||||
|
||||
# 3. Builder
|
||||
@@ -43,6 +45,7 @@ RUN chown nextjs:nodejs .next
|
||||
# Automatically leverage output traces to reduce image size
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
|
||||
|
||||
USER nextjs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user