# Puma configuration for: <% c = Capistrano::BaseHelper::get_capistrano_instance %>
# <%= "#{c.fetch(:application)} running as #{c.fetch(:user)} in environment #{Capistrano::BaseHelper.environment}" %>
workers <%= c.fetch(:puma_workers) %>
threads <%= c.fetch(:puma_min_threads) %>, <%= c.fetch(:puma_max_threads) %>
bind '<%= c.fetch(:puma_socket_url) %>'
pidfile '<%= c.fetch(:puma_pid_file) %>'
state_path '<%= c.fetch(:puma_state_file) %>'
environment '<%= "#{Capistrano::BaseHelper.environment}" %>'
<%= "activate_control_app '#{c.fetch(:puma_control_url)}'" if c.fetch(:puma_activate_control_app) %>

# Must preload application in case there are errors, if not, infinite restarts will happen
preload_app!

# TODO - fix restart block!
# <%= "on_restart do"              if c.fetch(:puma_on_restart_active) %>
# <%= "  puts \"Restarting puma\"" if c.fetch(:puma_on_restart_active) %>
# <%= "end"                        if c.fetch(:puma_on_restart_active) %>

# Puma configuration for: <% c = Capistrano::BaseHelper::get_capistrano_instance %>
# <%= "#{c.fetch(:application)} running as #{c.fetch(:user)} in environment #{Capistrano::BaseHelper.environment}" %>
workers <%= c.fetch(:puma_workers) %>
threads <%= c.fetch(:puma_min_threads) %>, <%= c.fetch(:puma_max_threads) %>
bind '<%= c.fetch(:puma_socket_url) %>'
pidfile '<%= c.fetch(:puma_pid_file) %>'
state_path '<%= c.fetch(:puma_state_file) %>'
environment '<%= "#{Capistrano::BaseHelper.environment}" %>'
<%= "activate_control_app '#{c.fetch(:puma_control_url)}'" if c.fetch(:puma_activate_control_app) %>

# Must preload application in case there are errors, if not, infinite restarts will happen
preload_app!

directory <%= File.join(c.fetch(:deploy_to), "current") %>

# TODO - fix restart block!
# <%= "on_restart do"              if c.fetch(:puma_on_restart_active) %>
# <%= "  puts \"Restarting puma\"" if c.fetch(:puma_on_restart_active) %>
# <%= "end"                        if c.fetch(:puma_on_restart_active) %>

Add directory to puma config
Add directory to puma config
