Consistent services
This commit is contained in:
parent
2f3b568a5d
commit
b053e0e7a6
3 changed files with 5 additions and 5 deletions
|
@ -60,7 +60,7 @@ Description=Partynest web server
|
|||
[Service]
|
||||
ExecStart=/usr/bin/bundle exec rails server --environment production
|
||||
Group=group
|
||||
Restart=on-failure
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
|
|
|
@ -53,5 +53,5 @@ append :linked_dirs,
|
|||
|
||||
after 'deploy:publishing', 'deploy:restart'
|
||||
|
||||
after 'deploy:restart', 'puma:restart'
|
||||
after 'deploy:restart', 'puma:stop'
|
||||
after 'deploy:restart', 'sidekiq:stop'
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :puma do
|
||||
desc 'Restart Puma web server'
|
||||
task :restart do
|
||||
desc 'Stop Puma web server'
|
||||
task :stop do
|
||||
on roles(:web) do
|
||||
within release_path do
|
||||
statefile = File.join shared_path, 'tmp', 'pids', 'puma.state'
|
||||
execute :bundle, :exec, :pumactl, '--state', statefile, :restart
|
||||
execute :bundle, :exec, :pumactl, '--state', statefile, :stop
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Reference in a new issue