Created
December 30, 2008 19:14
-
-
Save neerajsingh0101/41716 to your computer and use it in GitHub Desktop.
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 :stages, %w(production staging) | |
require 'capistrano/ext/multistage' | |
server "67.207.136.195", :app, :web, :db, :primary => true | |
set :user, 'nkumar' | |
set :keep_releases, 3 | |
set :repository, "[email protected]:neerajdotname/gitlearn.git" # replace neerajdotname with your github username | |
set :use_sudo, false | |
set :scm, :git | |
set :deploy_via, :copy | |
# this will make sure that capistrano checks out the submodules if any | |
set :git_enable_submodules, 1 | |
set(:application) { "gitlearn_#{stage}" } # replace gitlearn with your application name | |
set (:deploy_to) { "/home/#{user}/apps/#{application}" } | |
set :copy_remote_dir, "/home/#{user}/tmp" | |
# source: http://tomcopeland.blogs.com/juniordeveloper/2008/05/mod_rails-and-c.html | |
namespace :deploy do | |
desc "Restarting mod_rails with restart.txt" | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
[:start, :stop].each do |t| | |
desc "#{t} task is a no-op with mod_rails" | |
task t, :roles => :app do ; end | |
end | |
desc "invoke the db migration" | |
task:migrate, :roles => :app do | |
send(run_method, "cd #{current_path} && rake db:migrate RAILS_ENV=#{stage} ") | |
end | |
end | |
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 :branch, "production" |
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 :branch, "master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment