entrypoint: Initialize settings.py files with the template.

This fixes a bug introduced in
62bf74190b, where the template
settings.py content wasn't being put in place properly.

The previous model meant that if the user exported the settings.py
file to the data directory, we'd end up appending various versions of
the users' configuration to it over time.

While those users should have been using the MANUAL_CONFIGURATION
setting, this at least is a much cleaner model for managing configuration.

Fixes #130.
Fixes #153.
Fixes #155.
This commit is contained in:
Tim Abbott
2018-08-31 11:43:01 -07:00
parent 30f518c2ee
commit a1ff3938ca

View File

@@ -295,6 +295,8 @@ initialConfiguration() {
nginxConfiguration
configureCerts
if [ "$MANUAL_CONFIGURATION" = "False" ] || [ "$MANUAL_CONFIGURATION" = "false" ]; then
# Start with the settings template file.
cp -a /home/zulip/deployments/current/zproject/prod_settings_template.py "$SETTINGS_PY"
databaseConfiguration
secretsConfiguration
authenticationBackends