mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
run-dev: Automatically set EXTERNAL_HOST for droplet dev servers.
As of commit 99242138a7 (#14530), this
is required when visiting a droplet dev server remotely.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import argparse
|
|||||||
import os
|
import os
|
||||||
import pwd
|
import pwd
|
||||||
import signal
|
import signal
|
||||||
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
@@ -78,6 +79,8 @@ if options.interface is None:
|
|||||||
# host. The same argument applies to the remote development
|
# host. The same argument applies to the remote development
|
||||||
# servers using username "zulipdev".
|
# servers using username "zulipdev".
|
||||||
options.interface = None
|
options.interface = None
|
||||||
|
if user_name == "zulipdev":
|
||||||
|
os.environ.setdefault("EXTERNAL_HOST", socket.gethostname() + ":9991")
|
||||||
else:
|
else:
|
||||||
# Otherwise, only listen to requests on localhost for security.
|
# Otherwise, only listen to requests on localhost for security.
|
||||||
options.interface = "127.0.0.1"
|
options.interface = "127.0.0.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user