DEV: Set DISCOURSE_PORT when spawning unicorn via ember-cli -u (#13346)

This means that Discourse will use the ember-cli proxy's port number in various places like auth redirects and emails
This commit is contained in:
David Taylor 2021-06-09 15:32:28 +01:00 committed by GitHub
parent f12551afd3
commit 3b6d6c7024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,8 @@ end
system "yarn -s install --cwd #{yarn_dir}"
if ARGV.include?("-u") || ARGV.include?("--unicorn")
unicorn_pid = spawn(__dir__ + "/unicorn")
unicorn_env = { "DISCOURSE_PORT" => ENV["DISCOURSE_PORT"] || "4200" }
unicorn_pid = spawn(unicorn_env, __dir__ + "/unicorn")
Thread.new do
require 'open3'