Merge pull request #2011 from mempool/wiz/fix-npm-install-no-optional

Fix npm install commands in Dockerfiles and ops scripts
This commit is contained in:
wiz 2022-07-07 20:37:34 +02:00 committed by GitHub
commit d46e1abd07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ jobs:
- name: Install (Prod dependencies only)
if: ${{ matrix.flavor == 'prod'}}
run: npm ci --prod --no-optional
run: npm ci --omit=dev --omit=optional
working-directory: ${{ matrix.flavor }}/backend
- name: Lint
@ -70,7 +70,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- name: Install (Prod dependencies only)
run: npm ci --prod --no-optional
run: npm ci --omit=dev --omit=optional
if: ${{ matrix.flavor == 'prod'}}
working-directory: ${{ matrix.flavor }}/frontend

View File

@ -8,7 +8,7 @@ COPY . .
RUN apt-get update
RUN apt-get install -y build-essential python3 pkg-config
RUN npm install
RUN npm install --omit=dev --omit=optional
RUN npm run build
FROM node:16.15.0-buster-slim

View File

@ -8,7 +8,7 @@ WORKDIR /build
COPY . .
RUN apt-get update
RUN apt-get install -y build-essential rsync
RUN npm i
RUN npm install --omit=dev --omit=optional
RUN npm run build
FROM nginx:1.17.8-alpine

View File

@ -56,7 +56,7 @@ build_frontend()
if [ ! -e "mempool-frontend-config.json" ];then
cp "${HOME}/mempool/production/mempool-frontend-config.${site}.json" "mempool-frontend-config.json"
fi
npm install --prod --no-optional || exit 1
npm install --omit=dev --omit=optional || exit 1
npm run build || exit 1
}
@ -75,7 +75,7 @@ build_backend()
-e "s!__ELEMENTS_RPC_PASS__!${ELEMENTS_RPC_PASS}!" \
"mempool-config.json"
fi
npm install --prod --no-optional || exit 1
npm install --omit=dev --omit=optional || exit 1
npm run build || exit 1
}