Fix systemd unit for Puma 5

This commit is contained in:
Jérémy Lecour 2022-02-13 19:22:56 +01:00 committed by Jérémy Lecour
parent 6ffe387dd8
commit fe773f3941
3 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,7 @@ gem 'rails-i18n', '~> 6.0'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
# Use Puma as the app server
gem 'puma', '~> 5.0'
gem 'puma', '< 6'
gem 'devise', '~> 4.7'
gem 'devise-i18n', '~> 1.8'

View File

@ -234,7 +234,7 @@ GEM
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.6)
puma (5.6.2)
puma (4.3.11)
nio4r (~> 2.0)
pundit (1.1.0)
activesupport (>= 3.0.0)
@ -412,7 +412,7 @@ DEPENDENCIES
open4
pry-byebug
pry-rails
puma (~> 5.0)
puma (< 6)
pundit (~> 1.1)
rack-contrib
rails (~> 6.1)

View File

@ -3,14 +3,13 @@ Description=Puma Server for Chexpire (%i)
After=network.target
[Service]
Type=forking
Type=simple
User=chexpire_%i
EnvironmentFile=/home/chexpire_%i/www/current/.rbenv-vars
Environment=RAILS_ENV=%i
WorkingDirectory=/home/chexpire_%i/www/current/
PIDFile=/home/chexpire_%i/www/shared/tmp/pids/puma.pid
ExecStart=/home/chexpire_%i/.rbenv/bin/rbenv exec bundle exec puma -C /home/chexpire_%i/www/current/config/puma.rb --daemon
ExecStart=/home/chexpire_%i/.rbenv/bin/rbenv exec bundle exec puma -C /home/chexpire_%i/www/current/config/puma.rb
ExecStop=/home/chexpire_%i/.rbenv/bin/rbenv exec bundle exec pumactl -F /home/chexpire_%i/www/current/config/puma.rb stop
ExecReload=/home/chexpire_%i/.rbenv/bin/rbenv exec bundle exec pumactl -F /home/chexpire_%i/www/current/config/puma.rb phased-restart