Skip to content

Instantly share code, notes, and snippets.

@plainprogrammer
Created October 11, 2011 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plainprogrammer/1279547 to your computer and use it in GitHub Desktop.
Save plainprogrammer/1279547 to your computer and use it in GitHub Desktop.
A Capfile for Node.js deployment
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
##################################
# Edit these
set :application, "app_name"
set :node_file, "server.js"
set :host, "app.example.com"
set :repository, "git://github.com/example/example.git"
set :branch, "master"
set :deploy_to, "/var/apps/#{application}"
####################################
set :scm, :git
set :deploy_via, :remote_cache
role :app, host
set :user, "deploy"
set :use_sudo, false
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
# DO NOTHING! - Upstart will take care of this
end
task :stop, :roles => :app, :except => { :no_release => true } do
# DO NOTHING! - Upstart will take care of this
end
task :restart, :roles => :app, :except => { :no_release => true } do
# DO NOTHING! - Monit will take care of this
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment