Skip to content
Node.js deployment tool, inspired by Ruby's Capistrano.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



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": "",
      "user": "deploy",
      "repo": "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

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

  * 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.
You can’t perform that action at this time.