diff --git a/web/Dockerfile b/web/Dockerfile index aa27974..2f8cc35 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=20-alpine +ARG NODE_VERSION=19-alpine FROM node:${NODE_VERSION} AS builder WORKDIR /usr/srv/app @@ -7,11 +7,11 @@ RUN npm install -g pnpm COPY --chown=node:node package.json pnpm-lock.yaml ./ -RUN pnpm install --frozen-lockfile --prod=false +RUN pnpm install --frozen-lockfile --prod=false && pnpm prisma generate COPY --chown=node:node . . -RUN pnpm prisma generate && pnpm build +RUN pnpm build FROM node:${NODE_VERSION} AS runner WORKDIR /usr/srv/app @@ -21,7 +21,7 @@ RUN npm install -g pnpm COPY --from=builder --chown=node:node /usr/srv/app/package.json /usr/srv/app/pnpm-lock.yaml ./ -RUN pnpm install --frozen-lockfile --prod +RUN pnpm install --frozen-lockfile --prod && pnpm prisma generate COPY --from=builder --chown=node:node /usr/srv/app/build ./