mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 18:33:54 +08:00
FEATURE: Allow the specification of an arbitrary unicorn listen address
Useful if you want to, say, have your unicorn listen on a Unix domain socket, rather than a TCP port, or you want to be able to bind to a single address other than 127.0.0.1.
This commit is contained in:
parent
c661934d41
commit
e3b1c3a37b
|
@ -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_BIND_ALL"] ? "" : "127.0.0.1:")}#{(ENV["UNICORN_PORT"] || 3000).to_i}"
|
||||
listen ENV["UNICORN_LISTENER"] || "#{(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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user