Need help with capistrano-node-deploy?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

loopj
197 Stars 55 Forks MIT License 132 Commits 4 Opened issues

Description

Capistrano recipe for deploying node.js apps

Services available

!
?

Need anything else?

Contributors list

# 8,744
CSS
Rails
Java
Android
81 commits
# 119,911
Rails
bugsnag
error-r...
Objecti...
7 commits
# 21,413
Markdow...
Git
Sass
changel...
6 commits
# 23,210
Ruby
Rails
Gin
ESLint
5 commits
# 184,184
CSS
TypeScr...
2 commits
# 49,921
Ruby
Swift
cloudfl...
websock...
2 commits
# 487,502
Node.js
hapijs
hapi
PHP
1 commit
# 154,695
eve-onl...
s3
slack
ooxml
1 commit
# 161,839
Shell
C
Objecti...
1 commit
# 24,954
CSS
Python
Shell
React N...
1 commit
# 183,944
HTML
Ruby
physics...
Shell
1 commit
# 596,002
JavaScr...
websock...
Ruby
Shell
1 commit

capistrano-node-deploy

Capistrano recipe for deploying node.js apps.

Features

  • Provides
    cap deploy
    functionality for your node app
  • Installs node packages (
    yarn
    ) during deploys, using a shared folder for speed
  • Automatically creates upstart scripts for your node apps
  • Provides tasks for starting (
    cap node:start
    ) and stopping (
    cap node:stop
    ) your node app

Usage

First install the gem:

sudo gem install capistrano-node-deploy

or add it to your

Gemfile
if you have one:
gem "capistrano-node-deploy"

Now add the following to your

Capfile
require "capistrano/node-deploy"

Full Capfile Example

require "capistrano/node-deploy"

set :application, "my-node-app-name" set :repository, "[email protected]:/loopj/my-node-app-name" set :user, "deploy" set :scm, :git set :deploy_to, "/var/apps/my-app-folder"

role :app, "myserver.com"

Overriding Default Settings

# Set app command to run (defaults to index.js, or your `main` file from `package.json`)
set :app_command, "my_server.coffee"

Set additional environment variables for the app

set :app_environment, "PORT=8080"

Set node binary to run (defaults to /usr/bin/node)

set :node_binary, "/usr/bin/coffee"

Set node environment (defaults to production)

set :node_env, "staging"

Set the user to run node as (defaults to deploy)

set :node_user, "james"

Set the name of the upstart command (defaults to #{application}-#{node_env})

set :upstart_job_name, "myserver"

Contributing to capistrano-node-deploy

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2012 James Smith. See LICENSE.txt for further details.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.