Simplified service manager using Docker containers.
You should install this module globally, as it's designed to be a command line tool.
$ npm install -g zackehh/dockserv
The basic idea is that you load definitions into
dockserv to easily start/stop services. One such example is the below (for
moduleexports =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 can be changed via
$ dserv set prefix <path>.
Assuming the above lives in a file named
mongo.js, you can load it into
$ 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
You can view all available commands using
$ dserv --help until I get some documentation up and running, it should be pretty straightforward.