README.md in capistrano3-puma-3.1.1 vs README.md in capistrano3-puma-4.0.0

- old
+ new

@@ -34,19 +34,28 @@ require 'capistrano/puma' install_plugin Capistrano::Puma, load_hooks: false # Default puma tasks without hooks install_plugin Capistrano::Puma::Monit, load_hooks: false # Monit tasks without hooks ``` +To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion. +```ruby + # Capfile + + require 'capistrano/rbenv' + require 'capistrano/puma' + install_plugin Capistrano::Puma +``` + ### Config To list available tasks use `cap -T` To upload puma config use: ```ruby cap production puma:config ``` -By default the file located in `shared/puma.config` +By default the file located in `shared/puma.rb` Ensure that `tmp/pids` and ` tmp/sockets log` are shared (via `linked_dirs`): `This step is mandatory before deploying, otherwise puma server won't start` @@ -90,11 +99,11 @@ 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) ``` - * Listening on tcp://0.0.0.0:9220 + * Listening on tcp://0.0.0.0:9292 * Listening on unix:///tmp/puma.sock ### Active Record For ActiveRecord the following line to your deploy.rb @@ -125,20 +134,22 @@ set :puma_init_active_record, false 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 :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" set :nginx_sites_available_path, '/etc/nginx/sites-available' set :nginx_sites_enabled_path, '/etc/nginx/sites-enabled' set :nginx_socket_flags, fetch(:nginx_flags) - set :nginx_ssl_certificate, "/etc/ssl/certs/{fetch(:nginx_config_name)}.crt" - set :nginx_ssl_certificate_key, "/etc/ssl/private/{fetch(:nginx_config_name)}.key" + set :nginx_ssl_certificate, "/etc/ssl/certs/#{fetch(:nginx_config_name)}.crt" + set :nginx_ssl_certificate_key, "/etc/ssl/private/#{fetch(:nginx_config_name)}.key" set :nginx_use_ssl, false + set :nginx_downstream_uses_ssl, false ``` __Notes:__ If you are setting values for variables that might be used by other plugins, use `append` instead of `set`. For example: ```ruby append :rbenv_map_bins, 'puma', 'pumactl'