1
0
Fork 0

Consistent services

This commit is contained in:
Alex Kotov 2018-12-09 09:59:03 +05:00
parent 2f3b568a5d
commit b053e0e7a6
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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