mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-10-23 04:51:58 +00:00
entrypoint: Only run puppet once.
If DISABLE_HTTPS was set, puppet would run twice, unnecessarily. Move the `zulip.conf` and subsequent Puppet application to be grouped with the others; this requires moving that above the nginx configuration, as it tweaks puppet-controlled nginx files.
This commit is contained in:
@@ -121,11 +121,6 @@ setConfigurationValue() {
|
||||
}
|
||||
nginxConfiguration() {
|
||||
echo "Executing nginx configuration ..."
|
||||
if [ "$DISABLE_HTTPS" == "True" ] || [ "$DISABLE_HTTPS" == "true" ]; then
|
||||
echo "Disabling https in nginx."
|
||||
crudini --set /etc/zulip/zulip.conf application_server http_only true
|
||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
||||
fi
|
||||
sed -i "s/worker_processes .*/worker_processes $NGINX_WORKERS;/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/client_max_body_size .*/client_max_body_size $NGINX_MAX_UPLOAD_SIZE;/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/proxy_buffering .*/proxy_buffering $NGINX_PROXY_BUFFERING;/g" /etc/nginx/zulip-include/proxy_longpolling
|
||||
@@ -134,6 +129,10 @@ nginxConfiguration() {
|
||||
puppetConfiguration() {
|
||||
echo "Executing puppet configuration ..."
|
||||
|
||||
if [ "$DISABLE_HTTPS" == "True" ] || [ "$DISABLE_HTTPS" == "true" ]; then
|
||||
echo "Disabling https in nginx."
|
||||
crudini --set /etc/zulip/zulip.conf application_server http_only true
|
||||
fi
|
||||
if [ "$QUEUE_WORKERS_MULTIPROCESS" == "True" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "true" ]; then
|
||||
echo "Setting queue workers to run in multiprocess mode ..."
|
||||
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess true
|
||||
@@ -318,9 +317,9 @@ autoBackupConfiguration() {
|
||||
initialConfiguration() {
|
||||
echo "=== Begin Initial Configuration Phase ==="
|
||||
prepareDirectories
|
||||
puppetConfiguration
|
||||
nginxConfiguration
|
||||
configureCerts
|
||||
additionalPuppetConfiguration
|
||||
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"
|
||||
|
Reference in New Issue
Block a user