From 526a728dbc232843e9c4e87da3688cb8f18cd115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 26 Jun 2022 22:22:39 +0000 Subject: [PATCH 1/2] Use systemd instead of daemon version Puma 5.0 remove daemon support so we need to use systemd instead. --- Capfile | 1 + config/deploy/production.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/Capfile b/Capfile index c40535d1..9ba9264f 100644 --- a/Capfile +++ b/Capfile @@ -8,3 +8,4 @@ require 'capistrano/rvm' require 'capistrano/rails' require 'capistrano/puma' install_plugin Capistrano::Puma +install_plugin Capistrano::Puma::Systemd diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 99e38608..3bfe0399 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -6,6 +6,7 @@ set :puma_bind, 'unix:/tmp/rails-contributors.sock' set :puma_preload_app, false set :puma_workers, 1 +set :puma_phased_restart, true set :rvm_ruby_version, '2.6.5' From fe5b43be28b682af220fac510dbc43773195945a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 26 Jun 2022 22:50:44 +0000 Subject: [PATCH 2/2] Set a non-relative rvm path so systemd can understand it --- config/deploy/production.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 3bfe0399..49bc8366 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -9,6 +9,7 @@ set :puma_phased_restart, true set :rvm_ruby_version, '2.6.5' +set :rvm_custom_path, '/home/rails/.rvm' namespace :deploy do after :normalize_assets, :gzip_assets do