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
This commit is contained in:
feorlen 2018-03-13 12:20:59 +00:00 committed by Tim Abbott
parent b22e8dc2b7
commit 4631a2bfc3
2 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,10 @@ the remote virtual machine, we recommend installing
[Vagrant][install-vagrant] method so you can easily uninstall if you [Vagrant][install-vagrant] method so you can easily uninstall if you
need to. need to.
For a direct install, also set `EXTERNAL_HOST=<REMOTE_IP>: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 ## Running the development server
Once you have set up the development environment, you can start up the Once you have set up the development environment, you can start up the

View File

@ -26,6 +26,11 @@ if EXTERNAL_HOST is None:
REALM_HOSTS = { REALM_HOSTS = {
'zulip': 'localhost:9991' 'zulip': 'localhost:9991'
} }
else:
REALM_HOSTS = {
'zulip': EXTERNAL_HOST,
}
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# Uncomment extra backends if you want to test with them. Note that # Uncomment extra backends if you want to test with them. Note that