Move stage-specific Capistrano code
This commit is contained in:
parent
6848c261ae
commit
0f0e85ba95
|
@ -50,18 +50,3 @@ append :linked_dirs,
|
|||
# Uncomment the following to require manually verifying the host key
|
||||
# before first deploy.
|
||||
# set :ssh_options, verify_host_key: :secure
|
||||
|
||||
namespace :deploy do
|
||||
after :published, :restart
|
||||
|
||||
desc 'Restart application services'
|
||||
task :restart do
|
||||
on roles(:web) do
|
||||
execute :sudo, :systemctl, :restart, 'partynest-web.service'
|
||||
end
|
||||
|
||||
on roles(:app) do
|
||||
execute :sudo, :systemctl, :restart, 'partynest-worker.service'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
server '138.197.0.6', roles: %w[web app db]
|
||||
|
||||
namespace :deploy do
|
||||
after :published, :restart
|
||||
|
||||
desc 'Restart application services'
|
||||
task :restart do
|
||||
on roles(:web) do
|
||||
execute :sudo, :systemctl, :restart, 'partynest-web.service'
|
||||
end
|
||||
|
||||
on roles(:app) do
|
||||
execute :sudo, :systemctl, :restart, 'partynest-worker.service'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Reference in New Issue