Move to own variable for detecting production build.

This commit is contained in:
SamTV12345 2023-07-01 18:57:36 +02:00
parent 4ee98749bb
commit e61e752895
2 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ ARG INSTALL_SOFFICE=
# leaner (development dependencies are not installed) and runs faster (among
# other things, assets are minified & compressed).
ENV NODE_ENV=production
ENV ETHERPAD_PRODUCTION=true
# Install dependencies required for modifying access.
RUN apk add shadow
# Follow the principle of least privilege: run as unprivileged user.

View file

@ -45,9 +45,9 @@ cd ep_etherpad-lite)
cd src
if [[ -z "${NODE_ENV}" ]]; then
if [[ -z "${ETHERPAD_PRODUCTION}" ]]; then
log "Installing dev dependencies"
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
else
log "Installing production dependencies"
npm ci --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1