apeman-dply

Deply manager for apeman


Keywords
apeman, command, deploy
License
MIT
Install
npm install apeman-dply@4.0.3

Documentation

apeman-dply

Build Status Code Climate Code Coverage npm Version JS Standard

Deply manager for apeman

Installation

Install apeman-dply module via npm.

$ npm install apeman-dply -g

Usage

  1. Prepare an Apemanfile.js at your project root.
  2. Run the command via CLI.

Apemanfile.js

/** Example of Apemanfile.js */

'use strict'

module.exports = {
  $cwd: __dirname,
  $pkg: { /* ... */ },
  $proto: [ /* ... */ ],
  $tmpls: { /* ... */ },
  $tasks: { /* ... */ },
  $apps: { /* ... */ },
  $wtchs: { /* ... */ },
  $infrs: {
    'my-node-01': './infra/node/Dockerfile' // Path infra docker path.
  },
  $dply: {
    'my-deploy-01': [
      require.resolve('./deploy/conf/node.conf.json')
    ]
  }
}

Then,

$ apeman-dply
CLI Options
$ apeman-dply -h

  Usage: apeman-dply [options] [name...] 

  Deploy project on docker.

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -v, --verbose                        Show verbose logs
    -f, --force                          Force to remove container.
    -d, --delete                         Remove container.
    -c, --configuration <configuration>  Pathname of Apemanfile
    -l, --list                           List available watches
    -t, --tty                            Open terminal for dply
    -r, --rerun                          Delete and execute deploying again.
    -e, --exec <exec>                    Execute a command inside container.
    -p, --print                          Print container log.
    -P, --printon                        Print and follow container log.

  Examples:

    $ apeman-dply                     # Execute deploying defined in $dplys prop.
    $ apeman-dply -l     # List available deploy.
    $ apeman-dply -t node     # Open terminal for a deploy.
    $ apeman-dply "node*"     # Execute deploy which match pattern.
    $ apeman-dply -d     # Remove all deploy defined in $infra prop.

Programmatic API

apeman-dply also provide programmatic API.

Firstly, install the module locally.

$ npm install apeman-dply --save-dev

Then,

'use strict'

const apemanDply = require('apeman-dply')

apemanDply({
// Options
}).then(() => {
  /* ... */
})
Programmatic Options
Key Description Default
verbose Show verbose logs
force Force to remove container.
delete Remove container.
configuration Pathname of Apemanfile
list List available watches
tty Open terminal for dply
rerun Delete and execute deploying again.
exec Execute a command inside container.
print Print container log.
printon Print and follow container log.

License

This software is released under the MIT License.

Links