discourse/config/puma.rb

21 lines
666 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-07-27 20:20:09 -05:00
if ENV['RAILS_ENV'] == 'production'
2016-02-23 21:49:31 -06:00
# First, you need to change these below to your situation.
APP_ROOT = '/home/discourse/discourse'
num_workers = ENV["NUM_WEBS"].to_i > 0 ? ENV["NUM_WEBS"].to_i : 4
# Second, you can choose how many threads that you are going to run at same time.
workers "#{num_workers}"
2017-07-27 20:20:09 -05:00
threads 8, 32
2016-02-23 21:49:31 -06:00
# Unless you know what you are changing, do not change them.
2017-07-27 20:20:09 -05:00
bind "unix://#{APP_ROOT}/tmp/sockets/puma.sock"
stdout_redirect "#{APP_ROOT}/log/puma.log", "#{APP_ROOT}/log/puma.err.log"
2016-02-23 21:49:31 -06:00
pidfile "#{APP_ROOT}/tmp/pids/puma.pid"
state_path "#{APP_ROOT}/tmp/pids/puma.state"
preload_app!
end