CouchDB Docker image running npm-registry-couchapp.
This docker image is for test and development purposes only.
$ docker pull semanticrelease/npm-registry-docker:latest
$ docker run -d -p 5984:5984 semanticrelease/npm-registry-docker
The npm registry is accessible on http://localhost:5984/registry/_design/app/_rewrite
and the CouchDB user admin
with password admin
is created.
To configure npm to use the registry:
$ npm config set registry http://localhost:5984/registry/_design/app/_rewrite
To create a npm user and configure npm authentication:
$ curl -H 'Content-Type: application/json' -XPUT -d '{"_id": "org.couchdb.user:npm-user","name": "npm-user","roles": [],"type": "user","password": "npm-password","email": "npm-user@test.com"}' "http://admin:admin@localhost:5984/_users/org.couchdb.user:npm-user"
$ echo "_auth = $(echo -n npm-user:npm-password | base64)" >> .npmrc
$ echo "email = npm-user@test.com" >> .npmrc
$ docker run -d -p 5984:5984 -e COUCHDB_USER=my-user -e COUCHDB_PASSWORD=my-password -e VHOST=my-registry.com semanticrelease/npm-registry-docker
The npm registry is accessible on http://my-registry:5984
and the CouchDB user my-user
with password my-password
is created.
To configure npm to use the registry:
$ npm config set registry http://my-registry:5984
To create a npm user and configure npm authentication:
$ curl -H 'Content-Type: application/json' -XPUT -d '{"_id": "org.couchdb.user:npm-user","name": "npm-user","roles": [],"type": "user","password": "npm-password","email": "npm-user@test.com"}' "http://my-user:my-password@localhost:5984/_users/org.couchdb.user:npm-user"
$ echo "_auth = $(echo -n npm-user:npm-password | base64)" >> .npmrc
$ echo "email = npm-user@test.com" >> .npmrc