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

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

diff --git a/bin/ember-cli b/bin/ember-cli
index 53da667..5c1a753 100755
--- a/bin/ember-cli
+++ b/bin/ember-cli
@@ -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'

GitHub sha: 3b6d6c70240533e64a3256c9b90f02820b4649a2

This commit appears in #13346 which was approved by pmusaraj. It was merged by davidtaylorhq.