From 5f0211285e5a40f20481bfd7db70613add462137 Mon Sep 17 00:00:00 2001 From: Adam Birds Date: Fri, 16 Apr 2021 02:37:09 +0000 Subject: [PATCH] tools: Update run-dev.py to output right subdomain if on Zulip droplet. I have updated `tools/run-dev.py` to output the correct subdomain such as `http://zulip.username.zulipdev.org` so that the user knows the correct subdomain to access the Zulip Dev realm on. --- tools/run-dev.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/run-dev.py b/tools/run-dev.py index 8dc7f6dcab..e98d605948 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -370,7 +370,10 @@ def print_listeners() -> None: # EXTERNAL_HOST logic from dev_settings.py. IS_DEV_DROPLET = pwd.getpwuid(os.getuid()).pw_name == "zulipdev" if IS_DEV_DROPLET: - default_hostname = os.uname()[1].lower() + # Technically, the `zulip.` is a subdomain of the server, so + # this is kinda misleading, but 99% of development is done on + # the default/zulip subdomain. + default_hostname = "zulip." + os.uname()[1].lower() else: default_hostname = "localhost" external_host = os.getenv("EXTERNAL_HOST", f"{default_hostname}:{proxy_port}")