Skip to content

Commit

Permalink
Merge pull request #103 from askagirl/feature/add_activate_control_app
Browse files Browse the repository at this point in the history
Feature/add activate control app
  • Loading branch information
seuros committed May 5, 2015
2 parents c98011e + 0899e4f commit a730759
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Configurable options, shown here with defaults: Please note the configuration op
set :puma_state, "#{shared_path}/tmp/pids/puma.state"
set :puma_pid, "#{shared_path}/tmp/pids/puma.pid"
set :puma_bind, "unix://#{shared_path}/tmp/sockets/puma.sock" #accept array for multi-bind
set :puma_default_control_app, "unix://#{shared_path}/tmp/sockets/pumactl.sock"
set :puma_conf, "#{shared_path}/puma.rb"
set :puma_access_log, "#{shared_path}/log/puma_access.log"
set :puma_error_log, "#{shared_path}/log/puma_error.log"
Expand Down
1 change: 1 addition & 0 deletions lib/capistrano/tasks/puma.cap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace :load do
set :puma_state, -> { File.join(shared_path, 'tmp', 'pids', 'puma.state') }
set :puma_pid, -> { File.join(shared_path, 'tmp', 'pids', 'puma.pid') }
set :puma_bind, -> { File.join("unix://#{shared_path}", 'tmp', 'sockets', 'puma.sock') }
set :puma_default_control_app, -> { File.join("unix://#{shared_path}", 'tmp', 'sockets', 'pumactl.sock') }
set :puma_conf, -> { File.join(shared_path, 'puma.rb') }
set :puma_access_log, -> { File.join(shared_path, 'log', 'puma_access.log') }
set :puma_error_log, -> { File.join(shared_path, 'log', 'puma_error.log') }
Expand Down
3 changes: 3 additions & 0 deletions lib/capistrano/templates/puma.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ stdout_redirect '<%=fetch(:puma_access_log)%>', '<%=fetch(:puma_error_log)%>', t
threads <%=fetch(:puma_threads).join(',')%>

<%= puma_bind %>
<% if fetch(:puma_control_app) %>
activate_control_app "<%= fetch(:puma_default_control_app) %>"
<% end %>
workers <%= puma_workers %>
<% if fetch(:puma_worker_timeout) %>
worker_timeout <%= fetch(:puma_worker_timeout).to_i %>
Expand Down

0 comments on commit a730759

Please sign in to comment.