Skip to content

burkostya/npm-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Notice

Please read deprecation notice in official repository https://github.com/npm/npm-registry-couchapp

And if you know actively developing fork give me to know.

Contents

Introduction

Dockerfile to build image with npm registry proxied with kappa.

Version

Current Version: 2.6.12

Installation

Pull the latest or specific version of the image from the docker index. This is the recommended method of installation as it is easier to update image in the future. These builds are performed by the Docker Trusted Build service.

docker pull burkostya/npm-registry:2.6.12

Alternately you can build the image yourself.

git clone https://github.com/burkostya/npm-registry.git
cd npm-registry
docker build -t '<user>/npm-registry' .

Quick Start

Run container

docker run --name='npm-registry' -i -t --rm \
  -p 5984:5984 -p 80:80 \
  burkostya/npm-registry:2.6.12

Couchdb with installed couchapp now available on http://localhost:5984.

Credentials:

  • username: admin
  • password: password

You can set your login and password for couchdb admin:

docker run --name='npm-registry' -i -t --rm \
  -e 'COUCHDB_ADMIN_LOGIN=<login>' \
  -e 'COUCHDB_ADMIN_PASSWORD=<password>' \
  -p 5984:5984 -p 80:80 \
  burkostya/npm-registry:2.6.12

Kappa is exposed on port 80. You can use it by setting option in .npmrc:

npm config set registry http://localhost

or adding option to every command:

npm --registry http://localhost

Configuration

Data Store

For data persistency you should mount a volume

/var/lib/couchdb

Volumes can be mounted in docker by specifying the '-v' option in the docker run command.

mkdir /opt/data/npm-registry
docker run --name='npm-registry' -d \
  -p 5984:5984 -p 80:80 \
  -v /opt/data/npm-registry:/var/lib/couchdb \
  burkostya/npm-registry:2.6.12

Upgrading

To upgrade to newer couchapp, follow this steps:

  • Update the docker image.
docker pull burkostya/npm-registry:2.6.12
  • Stop the currently running image
docker stop npm-registry
docker rm npm-registry
  • Backup the application data just by coping content of mounted volume
cp -r /opt/data/npm-registry /some/npm/backup/dir/
  • Start the image
docker run --name npm-registry -d \
  -e 'COUCHDB_ADMIN_LOGIN=<login>' \
  -e 'COUCHDB_ADMIN_PASSWORD=<password>' \
  -p 5984:5984 -p 80:80 \
  -v /opt/data/npm-registry:/var/lib/couchdb \
  burkostya/npm-registry:2.6.12

Thanks

  • @sameersbn for awesome template of container configuration

About

Docker image for running npm registry

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages