summaryrefslogtreecommitdiff
path: root/lib/capistrano/tasks/deploy_restart.rake
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-24 22:19:07 -0400
committerDavid Gay <david@davidgay.org>2021-05-24 22:19:07 -0400
commita631471bd64262e498cff26bb2465949f15370b5 (patch)
treea3fb70241c4a78f08f9e3ec29f5f86857868067b /lib/capistrano/tasks/deploy_restart.rake
parent89c07d9638ea895b8f0ce217d995138df918e24d (diff)
More work on tuning capistrano deploy
Diffstat (limited to 'lib/capistrano/tasks/deploy_restart.rake')
-rw-r--r--lib/capistrano/tasks/deploy_restart.rake9
1 files changed, 9 insertions, 0 deletions
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"