summaryrefslogblamecommitdiffstats
path: root/config/puma.rb
blob: 619ee439e817cd9d712188e6bc09e4e3c63e7e01 (plain) (tree)
1
2
3
4
5
6
7
8
9

                   


                                                 

            
                                 
   
 

                    
                                                        
 
                                   
 

                                                                    
 
                                        

                                                                  

                                                                         
 

                                              
 
           


                      
         
#!/usr/bin/env puma

if @config.environment_str == "production"
  root = File.expand_path('../', __FILE__)
  socket = "unix://#{root}/tmp/sockets/puma.sock"
else
  root = "."
  socket = "tcp://localhost:3000"
end

puts "Root: #{root}"

# Store the pid of the server in the file at “path”.
#
pidfile "#{root}/tmp/pids/puma.pid"

# Use “path” as the file to store the server info state. This is
# used by “pumactl” to query and control the server.
#
state_path "#{root}/tmp/pids/puma.state"

# Redirect STDOUT and STDERR to files specified. The 3rd parameter
# (“append”) specifies whether the output is appended, the default is
# “false”.
#
stdout_redirect "#{root}/log/puma.stdout.log",
                "#{root}/log/puma.stderr.log"

bind socket

# === Cluster mode ===

workers 4