refactor: remove invariant (#62275)

This commit is contained in:
Oliver Eyton-Williams
2025-09-19 19:36:20 +02:00
committed by GitHub
parent 56c34a3bd6
commit c6498cf0b4
6 changed files with 8 additions and 45 deletions
+1 -3
View File
@@ -38,14 +38,13 @@ WORKDIR /home/node/build
COPY --chown=node:node pnpm*.yaml .
COPY --chown=node:node package.json .
COPY --chown=node:node api/ api/
COPY --chown=node:node shared/ shared/
RUN npm i -g pnpm@10
# Weirdly this config does not seem necessary for the new api (the same number
# of deps are installed in both cases), but I'm including it just for
# consistency.
RUN pnpm config set dedupe-peer-dependents false
RUN pnpm install --prod --ignore-scripts -F=shared -F=api --frozen-lockfile
RUN pnpm install --prod --ignore-scripts -F=api --frozen-lockfile
RUN cd api && npx prisma@$(jq -r '.devDependencies.prisma' < package.json) generate
FROM node:22-bookworm
@@ -56,7 +55,6 @@ COPY --from=builder --chown=node:node /home/node/build/api/package.json api/
COPY --from=builder --chown=node:node /home/node/build/shared/config/curriculum.json shared/config/
COPY --from=deps --chown=node:node /home/node/build/node_modules/ node_modules/
COPY --from=deps --chown=node:node /home/node/build/shared/node_modules/ shared/node_modules/
COPY --from=deps --chown=node:node /home/node/build/api/node_modules/ api/node_modules/
CMD ["node", "api/src/server.js"]