mirror of https://github.com/zulip/zulip.git
settings: Set correct hostname for droplets in 18.04.
https://chat.zulip.org/#narrow/stream/3-backend/topic/droplet.20hostname
This commit is contained in:
parent
2825e6ad48
commit
c45d594b0e
|
@ -19,8 +19,12 @@ if external_host_env is None:
|
|||
user_id = os.getuid()
|
||||
user_name = pwd.getpwuid(user_id).pw_name
|
||||
if user_name == "zulipdev":
|
||||
# For our droplets, we use the external hostname by default.
|
||||
EXTERNAL_HOST = os.uname()[1].lower() + ":9991"
|
||||
# For most of our droplets, we use the hostname (eg github_username.zulipdev.org) by default.
|
||||
hostname = os.uname()[1].lower()
|
||||
# Some of the droplets (eg droplets on 18.04) has the github_username as hostname.
|
||||
if '.zulipdev.org' not in hostname:
|
||||
hostname += '.zulipdev.org'
|
||||
EXTERNAL_HOST = hostname + ":9991"
|
||||
else:
|
||||
# For local development environments, we use localhost by
|
||||
# default, via the "zulipdev.com" hostname.
|
||||
|
|
Loading…
Reference in New Issue