Giter Club home page Giter Club logo

npm-registry's Introduction

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

npm-registry's People

Contributors

burkostya avatar loicmahieu avatar timkendrick avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.