diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90fcaa6d2..1d250a0d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 31acff047..6b368f59e 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -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 diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index e2874ff4e..b58b8ccd0 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -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 diff --git a/production/mempool-build-all b/production/mempool-build-all index 11342605d..5ac25f7e4 100755 --- a/production/mempool-build-all +++ b/production/mempool-build-all @@ -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 }