mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
remove some hardcoded 'localhost's from dev environment (#14801)
Trying to use a local test hostname other than localhost (e.g. discourse.test )for discourse development was difficult due the fact that localhost was hardcoded in a few places. This patch uses existing environment variables to allow a developer to use a different domain when developing. Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
@@ -5,14 +5,14 @@ require 'pathname'
|
||||
|
||||
RAILS_ROOT = File.expand_path("../../", Pathname.new(__FILE__).realpath)
|
||||
PORT = ENV["UNICORN_PORT"] ||= "3000"
|
||||
|
||||
HOSTNAME = ENV["DISCOURSE_HOSTNAME"] ||= "localhost"
|
||||
yarn_dir = File.join(RAILS_ROOT, "app/assets/javascripts/discourse")
|
||||
|
||||
PROXY =
|
||||
if ARGV.include?("--try")
|
||||
"https://try.discourse.org"
|
||||
else
|
||||
"http://localhost:#{PORT}"
|
||||
"http://#{HOSTNAME}:#{PORT}"
|
||||
end
|
||||
|
||||
command =
|
||||
|
||||
Reference in New Issue
Block a user