fix(prisma): suppress CLI update banner during migrations and builds
Deploy Canina / deploy (push) Successful in 2m34s

This commit is contained in:
devops committed 2026-10-20 09:46:32 +00:00
1 parent 2f178db2c6
commit f59dd6ebec
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -2,6 +2,7 @@ FROM node:20-alpine AS builder
USER root
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
WORKDIR /app
ENV PRISMA_HIDE_UPDATE_MESSAGE=true
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
ENV PRISMA_ENGINES_MIRROR=https://registry.npmmirror.com/-/binary/prisma
ENV DISABLE_OPENCOLLECTIVE=1
@@ -33,6 +34,7 @@ USER root
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
RUN mkdir -p /app/uploads && chown node:node /app/uploads
WORKDIR /app
ENV PRISMA_HIDE_UPDATE_MESSAGE=true
COPY --chown=node:node --from=builder /app/package*.json ./
COPY --chown=node:node --from=builder /app/tsconfig.json ./tsconfig.json
COPY --chown=node:node --from=builder /app/eslint.config.mjs ./eslint.config.mjs
+2 -2
View File
@@ -146,9 +146,9 @@ sleep 15
# fail-closed, and applies only migrations already reviewed and committed.
echo "Applying committed database migrations..."
if [ "$BRANCH" = "main" ]; then
docker exec "${CONTAINER_PREFIX}" npx prisma migrate resolve --applied 20261013210253_add_admin_modules >/dev/null 2>&1 || true
docker exec -e PRISMA_HIDE_UPDATE_MESSAGE=true "${CONTAINER_PREFIX}" npx prisma migrate resolve --applied 20261013210253_add_admin_modules >/dev/null 2>&1 || true
fi
docker exec "${CONTAINER_PREFIX}" npx prisma migrate deploy
docker exec -e PRISMA_HIDE_UPDATE_MESSAGE=true "${CONTAINER_PREFIX}" npx prisma migrate deploy
# Code-only deployment: seed and destructive data changes are not performed here.