HomePhabricator

Use npm ci instead of install for docker deployments

Description

Use npm ci instead of install for docker deployments

Summary:
npm ci is a more robust way to build in CI or production environments
since it strictly builds from package-lock.json and will not modify it (contrary
to what npm install might do).

The NPM docs also suggest npm ci might be faster in some circumstances, but I don't
notice a perf difference on my machine.

Depends on D9158

Test Plan:

docker build -t cashtab .

For sanity:

docker run -it -p 9000:80 cashtab

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9159

Details

Provenance
jasonbcoxAuthored on Feb 3 2021, 21:33
jasonbcoxPushed on Feb 4 2021, 16:07
Reviewer
Restricted Project
Differential Revision
D9159: Use npm ci instead of install for docker deployments
Parents
rABC5ba6211c6d43: Do not bust cached npm-installed dependencies when source files change
Branches
Unknown
Tags
Unknown