title: Capistrano & Puma, configuration
body: <p>When deploying with Capistrano and use it to start the puma server you just include <code>require 'puma/capistrano'</code> and it does the magic when using <code>cap deploy</code> etc.</p>
  
  <p>But how do i configure the puma server? I mean, let's say I want to change how many workers, cluster mode etc.</p>
  
  <p><strong>Solution:</strong> Found this in puma/capistrano.rb</p>
  
  <pre><code>def config_file
      @_config_file ||= begin
        file = fetch(:puma_config_file, nil)
        file = "./config/puma/#{puma_env}.rb" if !file &amp;&amp; File.exists?("./config/puma/#{puma_env}.rb")
        file
      end
    end
  </code></pre>
  
  <p>So I guess I can just put a config file in that directory and it will work.</p>
  
  <pre><code>/config/puma/production.rb
  </code></pre>