mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-10-23 04:51:58 +00:00
Add a setting for load balancer IPs.
This commit is contained in:
@@ -209,6 +209,13 @@ putting it in `/opt/docker/zulip/zulip/certs/` (by default, the
|
||||
`zulip` container startup script will generate a self-signed certificate and
|
||||
install it in that directory).
|
||||
|
||||
**Load balancer**. To tell Zulip it's behind a load balancer, you can set
|
||||
`LOADBALANCER_IPS` to a comma-separated list of IPs. This will tell Zulip
|
||||
to pass the real IP of the client instead of the IP of the load balancer itself
|
||||
by [setting the IPs][loadbalancer-ips] under `[loadbalancer]` in `zulip.conf`.
|
||||
|
||||
[loadbalancer-ips]: https://zulip.readthedocs.io/en/latest/production/deployment.html#configuring-zulip-to-trust-proxies
|
||||
|
||||
### Manual configuration
|
||||
|
||||
The way the environment variables configuration process described in
|
||||
|
@@ -133,17 +133,32 @@ nginxConfiguration() {
|
||||
}
|
||||
additionalPuppetConfiguration() {
|
||||
echo "Executing additional puppet configuration ..."
|
||||
|
||||
local changedPuppetConf=false
|
||||
|
||||
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
|
||||
changedPuppetConf=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
|
||||
changedPuppetConf=true
|
||||
else
|
||||
echo "No additional puppet configuration executed."
|
||||
return 0
|
||||
echo "No additional puppet configuration executed for queue workers."
|
||||
fi
|
||||
|
||||
if [ -n "$LOADBALANCER_IPS" ]; then
|
||||
echo "Setting IPs for load balancer"
|
||||
crudini --set /etc/zulip/zulip.conf loadbalancer ips "${LOADBALANCER_IPS}"
|
||||
changedPuppetConf=true
|
||||
else
|
||||
echo "No additional puppet configuration executed for load balancer IPs."
|
||||
fi
|
||||
|
||||
if [ "$changedPuppetConf" = true ]; then
|
||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
||||
fi
|
||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
||||
}
|
||||
configureCerts() {
|
||||
case "$SSL_CERTIFICATE_GENERATION" in
|
||||
|
Reference in New Issue
Block a user