Browse Source

Reload the webapp after deploying

tags/0.3.6^2
Bèr Kessels 1 month ago
parent
commit
d900bbab9b
1 changed files with 29 additions and 1 deletions
  1. 29
    1
      config/deploy.rb

+ 29
- 1
config/deploy.rb View File

@@ -1,7 +1,7 @@
# config valid for current version and patch releases of Capistrano
lock '~> 3.14.1'

set :application, 'hours'
set :application, 'webapp'
set :repo_url, 'ssh://gitea@git.webschuur.com:2222/placebazaar/hours.git'

# Default branch is :master
@@ -38,3 +38,31 @@ append :linked_dirs, '.bundle'

# Uncomment the following to require manually verifying the host key before first deploy.
# set :ssh_options, verify_host_key: :secure
#
namespace :systemd do
desc 'Reload service'
task :reload do
on roles(:app) do
systemctl :reload
end
end

desc 'Restart service'
task :restart do
on roles(:app) do
systemctl :restart
end
end
desc 'Show the status of service'
task :status do
on roles(:app) do
systemctl :status
end
end

def systemctl(action)
sudo :systemctl, action, "#{fetch(:application)}.service"
end
end

after 'deploy:publishing', 'systemd:restart'

Loading…
Cancel
Save