Last active
August 29, 2015 14:01
-
-
Save thotmx/c7cd1dcc41511c10ab63 to your computer and use it in GitHub Desktop.
config/deploy.rb
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, 'prueba' | |
set :scm, "git" | |
set :repo_url, "[email protected]:LogicalBricks/prueba.git" | |
set :deploy_to, "/home/deployer/apps/#{fetch(:application)}" | |
set :ssh_options, { | |
forward_agent: true | |
} | |
set :log_level, :debug | |
set :linked_files, %w{config/database.yml config/secrets.yml} | |
set :linked_dirs, %w{bin log tmp vendor/bundle public/system public/uploads} | |
SSHKit.config.command_map[:rake] = "bundle exec rake" | |
SSHKit.config.command_map[:rails] = "bundle exec rails" | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart do | |
on roles(:app), in: :sequence, wait: 5 do | |
execute :touch, release_path.join('tmp/restart.txt') | |
end | |
end | |
after 'deploy:publishing', 'deploy:restart' | |
after :restart, :clear_cache do | |
on roles(:web), in: :groups, limit: 3, wait: 10 do | |
end | |
end | |
after :finishing, 'deploy:cleanup' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment