npm

Need private packages and team management tools?Check out npm Orgs. »

dockserv

0.1.0 • Public • Published

dockserv

Simplified service manager using Docker containers.

Installation

You should install this module globally, as it's designed to be a command line tool.

$ npm install -g zackehh/dockserv

Basic Usage

The basic idea is that you load definitions into dockserv to easily start/stop services. One such example is the below (for mongodb).

module.exports = {
  image: 'mongo',
  binds: [
    '$DOCKSERV_DATA/mongodb:/data/db'
  ],
  env: [
    'FOO=bar'
  ],
  ports: [
    '27017'
  ]
};

Super simple, the above defines that we want to use the MongoDB image, bind the data directory, and forward port 27017. $DOCKSERV_DATA is equal to $DOCKSERV_HOME/data, and $DOCKSERV_HOME can be changed via $ dserv set prefix <path>.

Assuming the above lives in a file named mongo.js, you can load it into dockserv easily:

$ dserv add mongodb mongo.js

And at that point, you can start/stop as needed:

$ dserv start mongodb
$ dserv stop mongodb
$ dserv restart mongodb

You can also load definitions from a URL, for example:

$ dserv add mongodb https://gist.github.com/zackehh/f078940d29bf3f5fe8e4c5a568d06c48/raw/mongodb.js

Commands

You can view all available commands using $ dserv --help until I get some documentation up and running, it should be pretty straightforward.

Keywords

none

install

npm i dockserv

Downloadsweekly downloads

1

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability