Add Prisma generation and schema support to Dockerfile

This commit is contained in:
AyrisAI
2026-05-14 16:50:37 +03:00
parent b024e20027
commit 431711b36e

View File

@@ -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