mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-10-23 16:13:45 +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
|
`zulip` container startup script will generate a self-signed certificate and
|
||||||
install it in that directory).
|
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
|
### Manual configuration
|
||||||
|
|
||||||
The way the environment variables configuration process described in
|
The way the environment variables configuration process described in
|
||||||
|
@@ -133,17 +133,32 @@ nginxConfiguration() {
|
|||||||
}
|
}
|
||||||
additionalPuppetConfiguration() {
|
additionalPuppetConfiguration() {
|
||||||
echo "Executing additional puppet configuration ..."
|
echo "Executing additional puppet configuration ..."
|
||||||
|
|
||||||
|
local changedPuppetConf=false
|
||||||
|
|
||||||
if [ "$QUEUE_WORKERS_MULTIPROCESS" == "True" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "true" ]; then
|
if [ "$QUEUE_WORKERS_MULTIPROCESS" == "True" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "true" ]; then
|
||||||
echo "Setting queue workers to run in multiprocess mode ..."
|
echo "Setting queue workers to run in multiprocess mode ..."
|
||||||
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess true
|
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess true
|
||||||
|
changedPuppetConf=true
|
||||||
elif [ "$QUEUE_WORKERS_MULTIPROCESS" == "False" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "false" ]; then
|
elif [ "$QUEUE_WORKERS_MULTIPROCESS" == "False" ] || [ "$QUEUE_WORKERS_MULTIPROCESS" == "false" ]; then
|
||||||
echo "Setting queue workers to run in multithreaded mode ..."
|
echo "Setting queue workers to run in multithreaded mode ..."
|
||||||
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess false
|
crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess false
|
||||||
|
changedPuppetConf=true
|
||||||
else
|
else
|
||||||
echo "No additional puppet configuration executed."
|
echo "No additional puppet configuration executed for queue workers."
|
||||||
return 0
|
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
|
fi
|
||||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
|
||||||
}
|
}
|
||||||
configureCerts() {
|
configureCerts() {
|
||||||
case "$SSL_CERTIFICATE_GENERATION" in
|
case "$SSL_CERTIFICATE_GENERATION" in
|
||||||
|
Reference in New Issue
Block a user