Skip to content

Instantly share code, notes, and snippets.

@joshrowley
Created October 26, 2012 15:11
Show Gist options
  • Save joshrowley/3959330 to your computer and use it in GitHub Desktop.
Save joshrowley/3959330 to your computer and use it in GitHub Desktop.
spike's deploy.rb
require "bundler/capistrano"
set :application, "studentbody"
set :repository, "https://github.com/xfernandox/studentbody.git"
set :user, 'josh'
set :deploy_to, "/home/#{ user }/#{ application }"
set :use_sudo, false
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
default_run_options[:pty] = true
role :web, "198.74.60.181" # Your HTTP server, Apache/etc
role :app, "198.74.60.181" # This may be the same as your `Web` server
# if you want to clean up old releases on each deploy uncomment this:
# after "deploy:restart", "deploy:cleanup"
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment