DEV: add UNICORN_BIND_ALL

listen on local interface by default.
This commit is contained in:
Jeff Wong 2019-10-28 14:08:32 -07:00
parent 4935c9f1f8
commit 64d51ab45e

View File

@ -15,7 +15,7 @@ worker_processes (ENV["UNICORN_WORKERS"] || 3).to_i
working_directory discourse_path
# listen "#{discourse_path}/tmp/sockets/unicorn.sock"
listen (ENV["UNICORN_PORT"] || 3000).to_i
listen "#{(ENV["UNICORN_BIND_ALL"] ? "" : "127.0.0.1:")}#{(ENV["UNICORN_PORT"] || 3000).to_i}"
if !File.exist?("#{discourse_path}/tmp/pids")
FileUtils.mkdir_p("#{discourse_path}/tmp/pids")