Created
November 25, 2011 03:57
-
-
Save chocnut/1392779 to your computer and use it in GitHub Desktop.
deploy.rb
This file contains hidden or 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
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require 'rvm/capistrano' | |
require 'bundler/capistrano' | |
set :application, "staging.xxxx.com" | |
#set :repository, "." | |
set :scm, :git | |
set :repository, "." | |
set :deploy_via, :copy | |
# set :port, 16888 | |
#set :scm, :subversion | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
set :user, :someuser | |
set :deploy_to, "/var/www/#{application}" | |
set :use_sudo, false | |
role :web, "staging.xxxx.com" # Your HTTP server, Apache/etc | |
role :app, "staging.xxxx.com" # This may be the same as your `Web` server | |
role :db, "staging.xxxx.com", :primary => true # This is where Rails migrations will run | |
# role :db, "your slave db-server here" | |
# 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