fix: build script
This commit is contained in:
parent
302f129e91
commit
bc77e8aab5
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ ENV PNPM_HOME="/pnpm"
|
|||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
||||
RUN corepack enable
|
||||
RUN apt-get update && apt-get install -y openssl
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -11,6 +12,7 @@ COPY . .
|
|||
|
||||
FROM base AS deps
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||
RUN pnpm prisma generate
|
||||
|
||||
FROM base AS build
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
|
@ -18,7 +20,9 @@ RUN pnpm prisma generate
|
|||
RUN pnpm run build
|
||||
|
||||
FROM base as prod
|
||||
|
||||
ENV NODE_ENV="production"
|
||||
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/dist /app/dist
|
||||
COPY --from=base /app/static /app/static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue