fix(build): copy prisma to prisma/ and keep it in final build
- `prisma/` is required for running migrations and seeding the database
This commit is contained in:
parent
f125d525b9
commit
d5c7b2cf84
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ WORKDIR /app
|
|||
|
||||
RUN apk add --no-cache libc6-compat openssl1.1-compat
|
||||
|
||||
COPY prisma ./
|
||||
COPY prisma ./prisma
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ FROM base AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=deps /app/prisma ./prisma
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
|
|
@ -39,6 +40,7 @@ ENV NODE_ENV=production \
|
|||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/next.config.mjs ./
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
|
|
|
|||
Reference in a new issue