Skip to content

Commit

Permalink
Merge pull request #10 from UCLALibrary/cap_restart_apache
Browse files Browse the repository at this point in the history
Restart apache after a cap deploy
  • Loading branch information
Thomas Johnson committed Jul 18, 2018
2 parents e6c1da5 + f45a429 commit d0a3413
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
end
end

# Capistrano passenger restart isn't working consistently,
# so restart apache2 after a successful deploy, to ensure
# changes are picked up.
namespace :deploy do
after :finishing, :restart_apache do
on roles(:app) do
execute :sudo, :systemctl, :restart, :apache2
end
end
end

# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

Expand Down

0 comments on commit d0a3413

Please sign in to comment.