Created
February 14, 2009 11:36
-
-
Save gumayunov/64339 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 :application, "avatator" | |
set :deploy_to, "/home/gva/#{application}" | |
set :deploy_via, :remote_cache | |
set :scm, "git" | |
set :repository, "[email protected]:gumayunov/avatator.git" | |
set :git_enable_submodules, 1 | |
#set :gateway, 'unix.sk' | |
role :app, "avatator.ru" | |
role :publish, 'avatator.ru' | |
role :web, "avatator.ru" | |
role :db, "avatator.ru", :primary => true | |
set :use_sudo, false | |
ssh_options[:port] = 22122 | |
set :default_env, 'development' | |
set :rails_env, ENV['rails_env'] || ENV['RAILS_ENV'] || default_env | |
namespace :deploy do | |
#overrids standard capistrano task | |
task :symlink do | |
on_rollback { | |
run "cd #{deploy_to} && rm -f current && ln -s releases/#{File.basename previous_release} current" | |
} | |
relative_release_path = "releases/#{File.basename current_release}" | |
run "cd #{deploy_to} && rm -f current && ln -s #{relative_release_path} current" | |
run "ln -s #{shared_path}/config/database.yml #{current_release}/config/database.yml" | |
run "ln -s ../../../../shared/uploads/images #{current_release}/public/uploads/images" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment