README.md in capistrano3-puma-5.0.4 vs README.md in capistrano3-puma-5.1.0
- old
+ new
@@ -30,11 +30,11 @@
```ruby
install_plugin Capistrano::Puma::Daemon # If you using puma daemonized (not supported in Puma 5+)
```
or
```ruby
-install_plugin Capistrano::Puma::Systemd # if you use SystemD
+install_plugin Capistrano::Puma::Systemd # if you use SystemD
```
To prevent loading the hooks of the plugin, add false to the load_hooks param.
```ruby
# Capfile
@@ -45,12 +45,12 @@
```
To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion.
```ruby
# Capfile
-
- require 'capistrano/rbenv'
+
+ require 'capistrano/rbenv'
require 'capistrano/puma'
install_plugin Capistrano::Puma
```
### Config
@@ -121,13 +121,29 @@
```ruby
set :puma_service_unit_env_file, '/etc/environment'
```
```ruby
set :puma_service_unit_env_vars, %w[
- RAILSE_NV=development
+ RAILS_ENV=development
PUMA_METRICS_HTTP=tcp://0.0.0.0:9393
]
```
+
+### Systemd Socket Activation
+
+Systemd socket activation starts your app upon first request if it is not already running
+
+```ruby
+ set :puma_enable_socket_service, true
+```
+
+For more information on socket activation have a look at the `systemd.socket` [man page](https://man7.org/linux/man-pages/man5/systemd.socket.5.html).
+
+To restart the listening socket using Systemd run
+```
+cap puma:systemd:restart_socket
+```
+This would also restart the puma instance as the puma service depends on the socket service being active
### Multi bind
Multi-bind can be set with an array in the puma_bind variable
```ruby