mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
droplets: Set EXTERNAL_HOST to username.zulipdev.org:9991.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
# sample prod_settings.py file, with a few exceptions.
|
# sample prod_settings.py file, with a few exceptions.
|
||||||
from .prod_settings_template import *
|
from .prod_settings_template import *
|
||||||
import os
|
import os
|
||||||
|
import pwd
|
||||||
from typing import Set
|
from typing import Set
|
||||||
|
|
||||||
LOCAL_UPLOADS_DIR = 'var/uploads'
|
LOCAL_UPLOADS_DIR = 'var/uploads'
|
||||||
@@ -10,7 +11,15 @@ EMAIL_LOG_DIR = "/var/log/zulip/email.log"
|
|||||||
# Check if test_settings.py set EXTERNAL_HOST.
|
# Check if test_settings.py set EXTERNAL_HOST.
|
||||||
EXTERNAL_HOST = os.getenv('EXTERNAL_HOST')
|
EXTERNAL_HOST = os.getenv('EXTERNAL_HOST')
|
||||||
if EXTERNAL_HOST is None:
|
if EXTERNAL_HOST is None:
|
||||||
EXTERNAL_HOST = 'zulipdev.com:9991'
|
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] + ":9991"
|
||||||
|
else:
|
||||||
|
# For local development environments, we use localhost by
|
||||||
|
# default, via the "zulipdev.com" hostname.
|
||||||
|
EXTERNAL_HOST = 'zulipdev.com:9991'
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user