Enable customizable npm registry

This commit is contained in:
nolash 2021-10-22 16:44:59 +02:00
parent dd79fa7bd6
commit 15cb3478fb
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,11 @@ WORKDIR /root
RUN apk add --no-cache postgresql bash
ARG NPM_REPOSITORY=${NPM_REPOSITORY:-https://registry.npmjs.org}
RUN npm config set snyk=false
#RUN npm config set registry={NPM_REPOSITORY}
RUN npm config set registry=${NPM_REPOSITORY}
# copy the dependencies
COPY package.json package-lock.json ./
RUN --mount=type=cache,mode=0755,target=/root/.npm \

View File

@ -78,6 +78,7 @@ function handleServerMergePost(data, db, digest, keystore, signer) {
} else {
e = Envelope.fromJSON(v);
s = e.unwrap();
console.debug('s', s, o)
s.replace(o, 'server merge');
e.set(s);
s.onwrap = (e) => {

View File

@ -450,6 +450,7 @@ services:
dockerfile: docker/Dockerfile
args:
DOCKER_REGISTRY: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics}
NPM_REPOSITORY: ${DEV_NPM_REPOSITORY:-https://registry.npmjs.org}
environment:
DATABASE_HOST: ${DATABASE_HOST:-postgres}
DATABASE_PORT: ${DATABASE_PORT:-5432}
@ -666,4 +667,4 @@ services:
set +a
./import_ussd.sh
volumes:
- contract-config:/tmp/cic/config/:ro
- contract-config:/tmp/cic/config/:ro