Define puma_service_unit_name for consistency with installer

In capistrano3-puma v6.0.0, the default for 'puma_service_unit_name' changed to:
>  "#{application}_puma_#{stage}"

But the installer uses the older convention:
> "puma_#{application}_#{stage}"

To ensure consistency and avoid unit name conflicts when switching between
versions or deploying older branches, we now define the variable explicitly
in config/deploy.rb:

> set :puma_service_unit_name, -> { "puma_#{fetch(:application)}_#{fetch(:stage)}" }
This commit is contained in:
taitus
2025-05-28 14:28:35 +02:00
parent d1693f06fc
commit 19ab1139b9

View File

@@ -52,6 +52,7 @@ set :fnm_map_bins, %w[node npm rake yarn]
set :puma_systemctl_user, :user
set :puma_enable_socket_service, true
set :puma_service_unit_env_vars, ["EXECJS_RUNTIME=Disabled"]
set :puma_service_unit_name, -> { "puma_#{fetch(:application)}_#{fetch(:stage)}" }
set :puma_bind, "unix://#{shared_path}/tmp/sockets/puma.sock"
set :delayed_job_workers, 2