mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:14:15 +02:00
build: fix prisma generate in Dockerfile
This commit is contained in:
parent
a7b772f77a
commit
a2dba859f2
@ -7,21 +7,19 @@ RUN corepack enable
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
FROM base AS prod-deps
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||
|
||||
FROM base AS build
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
RUN pnpm exec prisma generate
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base
|
||||
COPY --from=prod-deps /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/node_modules/.prisma /app/node_modules/.prisma
|
||||
COPY --from=build /app/dist /app/dist
|
||||
|
||||
RUN pnpx prisma generate
|
||||
RUN pnpm run build
|
||||
RUN chown node:node .
|
||||
|
||||
USER node
|
||||
|
Loading…
x
Reference in New Issue
Block a user