Created
February 25, 2011 03:05
-
-
Save dirkkelly/843314 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
require 'rubygems' | |
require 'bundler/setup' | |
require 'bundler/capistrano' | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
set :rvm_ruby_string, 'ree-1.8.7@bluenail' # Or whatever env you want it to run in. | |
set :rvm_type, :system | |
set :user, "dk" | |
set :application, "Bluenail" | |
set :repository, "git@codebasehq.com:tfg/radiants/bluenail.git" | |
set :deploy_to, "/var/vhosts/bluenail.com.au" | |
set :use_sudo, false | |
set :scm, :git | |
task :production do | |
set :rails_env, 'production' | |
role :web, "203.153.237.134" | |
role :app, "203.153.237.134" | |
role :db, "203.153.237.134", :primary => true | |
end | |
after "deploy:symlink" do | |
run "rm #{release_path}/config/database.yml" | |
run "ln -s #{release_path}/config/database.server.yml #{release_path}/config/database.yml" | |
#run "cd #{release_path}; rake db:migrate RAILS_ENV=#{rails_env} --trace" | |
end | |
# If you are using Passenger mod_rails uncomment this: | |
# if you're still using the script/reapear helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
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