README.md in capistrano3-puma-5.0.2 vs README.md in capistrano3-puma-5.0.3
- old
+ new
@@ -114,10 +114,22 @@
To generate unit file use:
```
cap production puma:systemd:config puma:systemd:enable
```
+To use customize environment variables
+
+```ruby
+ set :puma_service_unit_env_file, '/etc/environment'
+```
+```ruby
+ set :puma_service_unit_env_vars, %w[
+ RAILSE_NV=development
+ PUMA_METRICS_HTTP=tcp://0.0.0.0:9393
+ ]
+```
+
### Multi bind
Multi-bind can be set with an array in the puma_bind variable
```ruby
set :puma_bind, %w(tcp://0.0.0.0:9292 unix:///tmp/puma.sock)
@@ -156,9 +168,12 @@
set :puma_preload_app, false
set :puma_daemonize, false
set :puma_plugins, [] #accept array of plugins
set :puma_tag, fetch(:application)
set :puma_restart_command, 'bundle exec puma'
+ set :puma_service_unit_name, "puma_#{fetch(:application)}_#{fetch(:stage)}"
+ set :puma_service_unit_env_file, nil
+ set :puma_service_unit_env_vars, []
set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
set :nginx_flags, 'fail_timeout=0'
set :nginx_http_flags, fetch(:nginx_flags)
set :nginx_server_name, "localhost #{fetch(:application)}.local"