From 3b6d6c70240533e64a3256c9b90f02820b4649a2 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 9 Jun 2021 15:32:28 +0100 Subject: [PATCH] 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 --- bin/ember-cli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ember-cli b/bin/ember-cli index 53da667c873..5c1a753d94a 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'