Extract a task to make things more atomic
This commit is contained in:
parent
1c55a38e81
commit
21028bd97b
1 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,12 @@ namespace :service do
|
||||||
command %{
|
command %{
|
||||||
echo "-----> Restarting puma service"
|
echo "-----> Restarting puma service"
|
||||||
#{echo_cmd %[sudo systemctl restart puma]}
|
#{echo_cmd %[sudo systemctl restart puma]}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Reload nginx"
|
||||||
|
task :reload_nginx do
|
||||||
|
command %{
|
||||||
echo "-----> Reloading nginx service"
|
echo "-----> Reloading nginx service"
|
||||||
#{echo_cmd %[sudo systemctl reload nginx]}
|
#{echo_cmd %[sudo systemctl reload nginx]}
|
||||||
}
|
}
|
||||||
|
@ -101,6 +107,7 @@ task :deploy do
|
||||||
|
|
||||||
on :launch do
|
on :launch do
|
||||||
invoke :'service:restart_puma'
|
invoke :'service:restart_puma'
|
||||||
|
invoke :'service:reload_nginx'
|
||||||
invoke :'service:restart_delayed_job'
|
invoke :'service:restart_delayed_job'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue