Add plumbing for new queue_workers_multiprocess setting.

This commit is contained in:
Jennifer Hwang
2021-04-25 08:32:18 -07:00
committed by GitHub
parent 9b7c0dba91
commit 43438bf84d
2 changed files with 22 additions and 0 deletions

View File

@@ -191,6 +191,13 @@ which you need to encode in the YAML file. For example,
comma-separated list of the backend names
(E.g. `"EmailAuthBackend,GitHubAuthBackend"`).
**Reducing RAM usage**. By default, the Zulip server automatically detect
whether the system has enough memory to run Zulip queue processors in the
higher-throughput but more multiprocess mode (or to save 1.5GiB of RAM with
the multithreaded mode). This algorithm might see the host's memory, not the
docker container's memory. Set to `QUEUE_WORKERS_MULTIPROCESS` to `true` or
`false` to override the automatic calculation.
**SSL Certificates**. By default, the image will generate a self-signed cert.
You can set `SSL_CERTIFICATE_GENERATION: "certbot"` within `docker-compose.yml`
to enable automatically-renewed Let's Encrypt certificates. By using certbot

View File

@@ -131,6 +131,20 @@ nginxConfiguration() {
sed -i "s/proxy_buffering .*/proxy_buffering $NGINX_PROXY_BUFFERING;/g" /etc/nginx/zulip-include/proxy_longpolling
echo "Nginx configuration succeeded."
}
additionalPuppetConfiguration() {
echo "Executing additional puppet configuration ..."
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
elif [ "$QUEUE_WORKERS_MULTIPROCESS" == "False" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "false" ]; then
echo "Setting queue workers to run in multithreaded mode ..."
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess false
else
echo "No additional puppet configuration executed."
return 0
fi
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
}
configureCerts() {
case "$SSL_CERTIFICATE_GENERATION" in
self-signed)
@@ -294,6 +308,7 @@ initialConfiguration() {
prepareDirectories
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"