deployer

0.0.6 • Public • Published

node-deployer

Deployer is a deployment tool for Node.js The whole tool is designed to be simple and sane in its function and its defaults.

Deployment Defaults

The command line utility parses your projects package.json to establish its defaults. Only three options are necessary to get fully automated deployments. Simply add a block like the following into either your project's package.json, or in a file named config/config.json in your project:

{ "deployment": { "host": "server.example.org", "user": "deploy", "repo": "git://example.org:example/app.git", "path": "/var/sites" } }

Whatever you specify in the deployer block will be used as the defaults for the deploy command.

You can also supply project dependencies in one of two ways. You can supply them in the package.json, in which case NPM will handle them during deployment. Or, you can add a dependencies section to the file name config/config.json in you project. The format of the dependencies block is the same either way. Here is an example:

{ "dependencies": { "http-proxy": null, "commander": "~0.2", "control": "0.2.1" } }

Overriding Defaults

You can override the defaults provided in your package.json using these options with the deploy command:

-H, --host Host to deploy to -U, --user User to deploy with -R, --repo Repository to deploy from

Callbacks

You can provide certain callbacks that will be invoked at different stages of the deployment cycle in order to customize behavior of Deployer. All callbacks are passed the Deployer object and, so, have access to all its properties and functions. The supported callbacks are as follows, in order of when they're called:

  • beforeDeploy()
  • beforeClone()
  • afterClone()
  • beforeNPM()
  • afterNPM()
  • beforeRestart()
  • onRestart()
  • afterRestart()
  • afterDeploy()

You can define your callbacks by setting them up as exports in a file at config/deployer.js within your project.

Readme

Keywords

none

Package Sidebar

Install

npm i deployer

Weekly Downloads

3

Version

0.0.6

License

none

Last publish

Collaborators

  • plainprogrammer