chore: update Dockerfile
This commit is contained in:
parent
c11fed9832
commit
d2c47ac15f
4 changed files with 779 additions and 6 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -12,22 +12,23 @@ WORKDIR /app
|
|||
|
||||
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
|
||||
RUN pnpm prisma generate
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base AS prod
|
||||
FROM base AS deps
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||
|
||||
FROM node:23-slim AS prod
|
||||
ENV NODE_ENV="production"
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/dist /app/dist
|
||||
COPY --from=base /app/static /app/static
|
||||
COPY --from=build /app/prisma /app/prisma
|
||||
COPY --from=build /app/static /app/static
|
||||
COPY entrypoint.sh .
|
||||
|
||||
RUN chmod u+x ./entrypoint.sh
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue