From a631471bd64262e498cff26bb2465949f15370b5 Mon Sep 17 00:00:00 2001 From: David Gay Date: Mon, 24 May 2021 22:19:07 -0400 Subject: More work on tuning capistrano deploy --- lib/capistrano/tasks/deploy_restart.rake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/capistrano/tasks/deploy_restart.rake (limited to 'lib/capistrano/tasks/deploy_restart.rake') diff --git a/lib/capistrano/tasks/deploy_restart.rake b/lib/capistrano/tasks/deploy_restart.rake new file mode 100644 index 0000000..3fe1f43 --- /dev/null +++ b/lib/capistrano/tasks/deploy_restart.rake @@ -0,0 +1,9 @@ +namespace :deploy do + desc "Restart Rails Service" + task :restart do + on roles(:app) do + execute "sudo /bin/systemctl restart rails.service" + end + end +end +after "deploy:finishing", "deploy:restart" -- cgit v1.2.3