Created
May 28, 2013 07:59
-
-
Save davidchua/5661182 to your computer and use it in GitHub Desktop.
Cappers (Capistrano) file for node.js production deployment - Make sure you have 'cappers' gem installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "Myapp" | |
set :repository, "ssh://git@bitbucket.org/yourrepo/app.git" | |
set :deploy_to, "/approot" | |
set :user, 'deployer' | |
set :use_sudo, false | |
set :use_nave, false | |
set :main_js, 'server.js' | |
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
role :web, "<ip>" # Your HTTP server, Apache/etc | |
role :app, "<ip>" # This may be the same as your `Web` server | |
role :db, "<ip>", :primary => true # This is where Rails migrations will run | |
set :node_env, 'production' | |
set :forever_cmd, './node_modules/.bin/forever' | |
desc "tail the application logfile" | |
task :log do | |
log = "#{application_dir}/current/log/#{node_env}.log" | |
run "tail -f #{log}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment