puma config is a production thing

This commit is contained in:
Sam 2016-02-24 14:49:31 +11:00
parent 8322bcf0c3
commit d7ac056606
1 changed files with 17 additions and 13 deletions

View File

@ -1,15 +1,19 @@
# First, you need to change these below to your situation. if ENV['RAILS_ENV']=='production'
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. # First, you need to change these below to your situation.
workers "#{num_workers}" APP_ROOT = '/home/discourse/discourse'
threads 8,32 num_workers = ENV["NUM_WEBS"].to_i > 0 ? ENV["NUM_WEBS"].to_i : 4
# Unless you know what you are changing, do not change them. # Second, you can choose how many threads that you are going to run at same time.
bind "unix://#{APP_ROOT}/tmp/sockets/puma.sock" workers "#{num_workers}"
stdout_redirect "#{APP_ROOT}/log/puma.log","#{APP_ROOT}/log/puma.err.log" threads 8,32
pidfile "#{APP_ROOT}/tmp/pids/puma.pid"
state_path "#{APP_ROOT}/tmp/pids/puma.state" # Unless you know what you are changing, do not change them.
daemonize true bind "unix://#{APP_ROOT}/tmp/sockets/puma.sock"
preload_app! stdout_redirect "#{APP_ROOT}/log/puma.log","#{APP_ROOT}/log/puma.err.log"
pidfile "#{APP_ROOT}/tmp/pids/puma.pid"
state_path "#{APP_ROOT}/tmp/pids/puma.state"
daemonize true
preload_app!
end