You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
495 B

threads_count = ENV.fetch 'RAILS_MAX_THREADS', 5
threads threads_count, threads_count
env = ENV.fetch 'RAILS_ENV', 'development'
environment env
workers ENV.fetch('WORKER', 4).to_i
if env == 'production'
listen = ENV.fetch('LISTEN') { 'unix://' + File.join(Dir.pwd, 'tmp/sockets/puma.sock') }
port = ENV['PORT']
listen = ENV['LISTEN']
port = ENV.fetch 'PORT', 3000
port(port) if port
bind listen if listen
pidfile File.join Dir.pwd, 'tmp/pids/'
plugin :tmp_restart