🏗️ Add compatibility with different prisma clients
This commit is contained in:
21
Dockerfile
21
Dockerfile
@ -4,12 +4,23 @@ ARG SCOPE
|
||||
ENV SCOPE=${SCOPE}
|
||||
RUN npm --global install pnpm
|
||||
|
||||
FROM base AS pruner
|
||||
RUN npm --global install turbo
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN turbo prune --scope=${SCOPE} --docker
|
||||
|
||||
FROM base AS builder
|
||||
RUN apt-get -qy update && apt-get -qy --no-install-recommends install openssl git
|
||||
COPY pnpm-lock.yaml .npmrc pnpm-workspace.yaml ./
|
||||
RUN pnpm fetch
|
||||
ADD . ./
|
||||
RUN pnpm install -r --offline
|
||||
WORKDIR /app
|
||||
COPY .gitignore .gitignore
|
||||
COPY .npmrc .pnpmfile.cjs ./
|
||||
COPY --from=pruner /app/out/json/ .
|
||||
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
RUN pnpm install
|
||||
COPY --from=pruner /app/out/full/ .
|
||||
COPY turbo.json turbo.json
|
||||
|
||||
RUN pnpm turbo run build:docker --filter=${SCOPE}...
|
||||
|
||||
FROM base AS runner
|
||||
@ -21,7 +32,7 @@ RUN apt-get -qy update \
|
||||
&& apt-get autoremove -yq \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY ./packages/db/prisma ./prisma
|
||||
COPY ./packages/db ./packages/db
|
||||
COPY ./apps/${SCOPE}/.env.docker ./apps/${SCOPE}/.env.production
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/apps/${SCOPE}/public ./apps/${SCOPE}/public
|
||||
|
Reference in New Issue
Block a user