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:
commit
d46e1abd07
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install (Prod dependencies only)
|
- name: Install (Prod dependencies only)
|
||||||
if: ${{ matrix.flavor == 'prod'}}
|
if: ${{ matrix.flavor == 'prod'}}
|
||||||
run: npm ci --prod --no-optional
|
run: npm ci --omit=dev --omit=optional
|
||||||
working-directory: ${{ matrix.flavor }}/backend
|
working-directory: ${{ matrix.flavor }}/backend
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
@ -70,7 +70,7 @@ jobs:
|
|||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- name: Install (Prod dependencies only)
|
- name: Install (Prod dependencies only)
|
||||||
run: npm ci --prod --no-optional
|
run: npm ci --omit=dev --omit=optional
|
||||||
if: ${{ matrix.flavor == 'prod'}}
|
if: ${{ matrix.flavor == 'prod'}}
|
||||||
working-directory: ${{ matrix.flavor }}/frontend
|
working-directory: ${{ matrix.flavor }}/frontend
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ COPY . .
|
|||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y build-essential python3 pkg-config
|
RUN apt-get install -y build-essential python3 pkg-config
|
||||||
RUN npm install
|
RUN npm install --omit=dev --omit=optional
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:16.15.0-buster-slim
|
FROM node:16.15.0-buster-slim
|
||||||
|
@ -8,7 +8,7 @@ WORKDIR /build
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y build-essential rsync
|
RUN apt-get install -y build-essential rsync
|
||||||
RUN npm i
|
RUN npm install --omit=dev --omit=optional
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:1.17.8-alpine
|
FROM nginx:1.17.8-alpine
|
||||||
|
@ -56,7 +56,7 @@ build_frontend()
|
|||||||
if [ ! -e "mempool-frontend-config.json" ];then
|
if [ ! -e "mempool-frontend-config.json" ];then
|
||||||
cp "${HOME}/mempool/production/mempool-frontend-config.${site}.json" "mempool-frontend-config.json"
|
cp "${HOME}/mempool/production/mempool-frontend-config.${site}.json" "mempool-frontend-config.json"
|
||||||
fi
|
fi
|
||||||
npm install --prod --no-optional || exit 1
|
npm install --omit=dev --omit=optional || exit 1
|
||||||
npm run build || exit 1
|
npm run build || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ build_backend()
|
|||||||
-e "s!__ELEMENTS_RPC_PASS__!${ELEMENTS_RPC_PASS}!" \
|
-e "s!__ELEMENTS_RPC_PASS__!${ELEMENTS_RPC_PASS}!" \
|
||||||
"mempool-config.json"
|
"mempool-config.json"
|
||||||
fi
|
fi
|
||||||
npm install --prod --no-optional || exit 1
|
npm install --omit=dev --omit=optional || exit 1
|
||||||
npm run build || exit 1
|
npm run build || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user