mirror of https://github.com/zulip/zulip.git
Rename local_settings_template to prod_settings_template.
This commit is contained in:
parent
19b860ceec
commit
35339f5117
|
@ -37,7 +37,7 @@ few files involved in the Zulip settings for server administrations.
|
|||
In a production environment, we have:
|
||||
|
||||
* `/etc/zulip/settings.py` (generated from
|
||||
`zproject/local_settings_template.py`) is the main system
|
||||
`zproject/prod_settings_template.py`) is the main system
|
||||
administration facing settings file for Zulip. It contains all the
|
||||
server-specific settings, such as how to send outgoing email, the
|
||||
hostname of the Postgres database, etc., but does not contain any
|
||||
|
@ -66,7 +66,7 @@ In a development environment, we have `zproject/settings.py`, and
|
|||
additionally:
|
||||
|
||||
* `zproject/dev_settings.py` has the settings for the Zulip development
|
||||
environment; it mostly just imports local_settings_template.py.
|
||||
environment; it mostly just imports prod_settings_template.py.
|
||||
|
||||
* `zproject/dev-secrets.conf` replaces `/etc/zulip/zulip-secrets.conf`.
|
||||
|
||||
|
@ -80,7 +80,7 @@ in two or three places:
|
|||
* In DEFAULT_SETTINGS in `zproject/settings.py`, with a default value
|
||||
for production environments.
|
||||
|
||||
* In an appropriate section of `zproject/local_settings_template.py`,
|
||||
* In an appropriate section of `zproject/prod_settings_template.py`,
|
||||
with documentation in the comments explaining the settings's
|
||||
purpose and effect.
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ fi
|
|||
|
||||
if [ "$has_appserver" = 0 ]; then
|
||||
/root/zulip/scripts/setup/generate_secrets.py
|
||||
cp -a /root/zulip/zproject/local_settings_template.py /etc/zulip/settings.py
|
||||
cp -a /root/zulip/zproject/prod_settings_template.py /etc/zulip/settings.py
|
||||
ln -nsf /etc/zulip/settings.py /root/zulip/zproject/prod_settings.py
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# This tools generates local_settings_generated.py using the template
|
||||
# This tools generates /etc/zulip/zulip-secrets.conf
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, os, os.path
|
||||
|
|
|
@ -52,7 +52,7 @@ mkdir -p "var/log"
|
|||
# TODO: Would be much better to instead run the below tools with some
|
||||
# sort of environment hack to make settings.VOYAGER=True so that we
|
||||
# don't need to create this dummy secrets file.
|
||||
cat >> zproject/local_settings_template.py <<EOF
|
||||
cat >> zproject/prod_settings_template.py <<EOF
|
||||
DEBUG = False
|
||||
EOF
|
||||
cat >> zproject/dev-secrets.conf <<EOF
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
# For the Dev VM environment, we use the same settings as the
|
||||
# sample prod_settings.py file, with a few exceptions.
|
||||
from .local_settings_template import *
|
||||
from .prod_settings_template import *
|
||||
|
||||
LOCAL_UPLOADS_DIR = 'var/uploads'
|
||||
EXTERNAL_HOST = 'localhost:9991'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# configured.
|
||||
#
|
||||
# On a normal Zulip production server, zproject/local_settings.py is a
|
||||
# symlink to /etc/zulip/settings.py (based off local_settings_template.py).
|
||||
# symlink to /etc/zulip/settings.py (based off prod_settings_template.py).
|
||||
import platform
|
||||
import six.moves.configparser
|
||||
from base64 import b64decode
|
||||
|
@ -25,7 +25,7 @@ ZULIP_COM_STAGING = PRODUCTION and config_file.get('machine', 'deploy_type') ==
|
|||
ZULIP_COM = ((PRODUCTION and config_file.get('machine', 'deploy_type') == 'zulip.com-prod')
|
||||
or ZULIP_COM_STAGING)
|
||||
if not ZULIP_COM:
|
||||
raise Exception("You should create your own local settings from local_settings_template.")
|
||||
raise Exception("You should create your own local settings from prod_settings_template.")
|
||||
|
||||
ZULIP_FRIENDS_LIST_ID = '84b2f3da6b'
|
||||
SHARE_THE_LOVE = True
|
||||
|
|
|
@ -6,7 +6,7 @@ from __future__ import absolute_import
|
|||
# * settings.py contains non-site-specific and settings configuration
|
||||
# for the Zulip Django app.
|
||||
# * settings.py imports prod_settings.py, and any site-specific configuration
|
||||
# belongs there. The template for prod_settings.py is local_settings_template.py
|
||||
# belongs there. The template for prod_settings.py is prod_settings_template.py
|
||||
#
|
||||
# See http://zulip.readthedocs.io/en/latest/settings.html for more information
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue