From e3b1c3a37bf525c458295e488448a62a554bc4c7 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Tue, 28 Jul 2020 13:03:17 +1000 Subject: [PATCH] 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. --- config/unicorn.conf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb index 1d1d0135ab..e76b3aa9b4 100644 --- a/config/unicorn.conf.rb +++ b/config/unicorn.conf.rb @@ -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")