mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
Update generate_enterprise_secrets to support running in production.
(imported from commit 1051f668ebe684cc60ba4444e815ef60398fad61)
This commit is contained in:
@@ -11,7 +11,6 @@ from zerver.lib.utils import generate_random_token
|
|||||||
|
|
||||||
os.chdir(os.path.join(os.path.dirname(__file__), '..', '..'))
|
os.chdir(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||||
|
|
||||||
OUTPUT_SETTINGS_FILENAME = "zproject/dev-secrets.conf"
|
|
||||||
CAMO_CONFIG_FILENAME = '/etc/default/camo'
|
CAMO_CONFIG_FILENAME = '/etc/default/camo'
|
||||||
|
|
||||||
AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password',
|
AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password',
|
||||||
@@ -35,6 +34,11 @@ def generate_django_secretkey():
|
|||||||
return get_random_string(50, chars)
|
return get_random_string(50, chars)
|
||||||
|
|
||||||
def generate_secrets(development=False):
|
def generate_secrets(development=False):
|
||||||
|
if development:
|
||||||
|
OUTPUT_SETTINGS_FILENAME = "zproject/dev-secrets.conf"
|
||||||
|
else:
|
||||||
|
OUTPUT_SETTINGS_FILENAME = "/etc/zulip/zulip-secrets.conf"
|
||||||
|
|
||||||
lines = ['[secrets]\n']
|
lines = ['[secrets]\n']
|
||||||
|
|
||||||
def config_line(var, value):
|
def config_line(var, value):
|
||||||
|
|||||||
Reference in New Issue
Block a user