Skip to content

Instantly share code, notes, and snippets.

@dennisreimann
Created March 22, 2009 14:49
Show Gist options
  • Save dennisreimann/83186 to your computer and use it in GitHub Desktop.
Save dennisreimann/83186 to your computer and use it in GitHub Desktop.
set :user, "dbloete"
set :domain, "the.domain.com"
set :application, "myapp"
set :deploy_to, "/var/www/#{application}"
set :repository, "[email protected]:#{user}/#{application}.git"
namespace :vlad do
desc "Symlinks the configuration files"
remote_task :symlink_config, :roles => :web do
%w(application.yml database.yml).each do |file|
run "ln -s #{shared_path}/config/#{file} #{current_path}/config/#{file}"
end
end
desc "Full deployment cycle: Update, migrate, restart, cleanup"
remote_task :deploy, :roles => :app do
Rake::Task['vlad:update'].invoke
Rake::Task['vlad:symlink_config'].invoke
Rake::Task['vlad:migrate'].invoke
Rake::Task['vlad:start_app'].invoke
Rake::Task['vlad:cleanup'].invoke
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment