Copy Puma systemd unit template from capistrano3-puma

This commit copies the default puma.service.erb template from the
capistrano3-puma gem into lib/capistrano/templates. This allows us to
customize the generated systemd unit file during deploy.

Note that we are also removing the `:puma_conf` variable from `config/deploy.rb`,
as the new ExecStart line in the systemd template (based on capistrano3-puma 6.0.0)
does not rely on a separate Puma config file. The command now directly invokes:

  ExecStart=<%= expanded_bundle_command %> exec puma -e <%= fetch(:puma_env) %>

This replaces the older format used in 5.2.0:

  ExecStart=<%= expanded_bundle_command %> exec --keep-file-descriptors puma -C <%= fetch(:puma_conf) %>

which required explicitly setting the Puma config path.
This commit is contained in:
taitus
2025-05-13 18:42:35 +02:00
parent db361d88f1
commit 034ecfeacd
3 changed files with 41 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
EnableDefaultLinters: false
exclude:
- '**/vendor/**/*'
- 'lib/capistrano/templates/*'
linters:
AllowedScriptType:
enabled: true