Skip to content

Commit

Permalink
Merge pull request #251 from karnov/fix-issue-243-restart-fails-if-al…
Browse files Browse the repository at this point in the history
…ready-started

#243 Fix restart task, pumactl don't call bundle exec on restart
  • Loading branch information
seuros authored Sep 7, 2017
2 parents 220e81c + 051cd71 commit 150f529
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Configurable options, shown here with defaults: Please note the configuration op
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'
Expand Down
1 change: 1 addition & 0 deletions lib/capistrano/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def set_defaults
set_if_empty :puma_preload_app, false
set_if_empty :puma_daemonize, false
set_if_empty :puma_tag, ''
set_if_empty :puma_restart_command, 'bundle exec puma'

# Chruby, Rbenv and RVM integration
append :chruby_map_bins, 'puma', 'pumactl'
Expand Down
2 changes: 2 additions & 0 deletions lib/capistrano/templates/puma.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ worker_timeout <%= fetch(:puma_worker_timeout).to_i %>
daemonize
<% end %>

restart_command '<%= fetch(:puma_restart_command) %>'

<% if puma_preload_app? %>
preload_app!
<% else %>
Expand Down

0 comments on commit 150f529

Please # to comment.