1
0
Fork 0

Move stage-specific Capistrano code

This commit is contained in:
Alex Kotov 2018-12-09 02:33:32 +05:00
parent 6848c261ae
commit 0f0e85ba95
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
2 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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