From 4631a2bfc3a0f5117c70e0bfdf8e2332dbb563cb Mon Sep 17 00:00:00 2001 From: feorlen Date: Tue, 13 Mar 2018 12:20:59 +0000 Subject: [PATCH] Set REALM_HOSTS based on EXTERNAL_HOST if it is available. Also update remote.md to recommend setting EXTERNAL_HOST in an environment variable. Fixes #8670 --- docs/development/remote.md | 4 ++++ zproject/dev_settings.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/development/remote.md b/docs/development/remote.md index 5b387f3ba8..af3ae412d2 100644 --- a/docs/development/remote.md +++ b/docs/development/remote.md @@ -41,6 +41,10 @@ the remote virtual machine, we recommend installing [Vagrant][install-vagrant] method so you can easily uninstall if you need to. +For a direct install, also set `EXTERNAL_HOST=:9991` in your +environment. This allows you to access Zulip running in your development +environment using a browser on another host. + ## Running the development server Once you have set up the development environment, you can start up the diff --git a/zproject/dev_settings.py b/zproject/dev_settings.py index bf2d0f8081..3bbbcc4663 100644 --- a/zproject/dev_settings.py +++ b/zproject/dev_settings.py @@ -26,6 +26,11 @@ if EXTERNAL_HOST is None: REALM_HOSTS = { 'zulip': 'localhost:9991' } +else: + REALM_HOSTS = { + 'zulip': EXTERNAL_HOST, + } + ALLOWED_HOSTS = ['*'] # Uncomment extra backends if you want to test with them. Note that