mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-21 01:49:22 +02:00
[Nginx] Use SOGo IPv4 for upstream
This commit is contained in:
parent
d1af52b4e7
commit
8853e2c44a
@ -20,8 +20,9 @@ def nginx_conf(env, template_vars):
|
|||||||
f.write(config)
|
f.write(config)
|
||||||
|
|
||||||
def prepare_template_vars():
|
def prepare_template_vars():
|
||||||
|
ipv4_network = os.getenv("IPV4_NETWORK", "172.22.1")
|
||||||
template_vars = {
|
template_vars = {
|
||||||
'IPV4_NETWORK': os.getenv("IPV4_NETWORK", "172.22.1"),
|
'IPV4_NETWORK': ipv4_network,
|
||||||
'TRUSTED_NETWORK': os.getenv("TRUSTED_NETWORK", False),
|
'TRUSTED_NETWORK': os.getenv("TRUSTED_NETWORK", False),
|
||||||
'SKIP_RSPAMD': os.getenv("SKIP_RSPAMD", "n").lower() in ("y", "yes"),
|
'SKIP_RSPAMD': os.getenv("SKIP_RSPAMD", "n").lower() in ("y", "yes"),
|
||||||
'SKIP_SOGO': os.getenv("SKIP_SOGO", "n").lower() in ("y", "yes"),
|
'SKIP_SOGO': os.getenv("SKIP_SOGO", "n").lower() in ("y", "yes"),
|
||||||
@ -30,7 +31,7 @@ def prepare_template_vars():
|
|||||||
'ADDITIONAL_SERVER_NAMES': os.getenv("ADDITIONAL_SERVER_NAMES", "").replace(',', ' '),
|
'ADDITIONAL_SERVER_NAMES': os.getenv("ADDITIONAL_SERVER_NAMES", "").replace(',', ' '),
|
||||||
'HTTP_PORT': os.getenv("HTTP_PORT", "80"),
|
'HTTP_PORT': os.getenv("HTTP_PORT", "80"),
|
||||||
'HTTPS_PORT': os.getenv("HTTPS_PORT", "443"),
|
'HTTPS_PORT': os.getenv("HTTPS_PORT", "443"),
|
||||||
'SOGOHOST': os.getenv("SOGOHOST", "sogo-mailcow"),
|
'SOGOHOST': os.getenv("SOGOHOST", ipv4_network + ".248"),
|
||||||
'RSPAMDHOST': os.getenv("RSPAMDHOST", "rspamd-mailcow"),
|
'RSPAMDHOST': os.getenv("RSPAMDHOST", "rspamd-mailcow"),
|
||||||
'PHPFPMHOST': os.getenv("PHPFPMHOST", "php-fpm-mailcow"),
|
'PHPFPMHOST': os.getenv("PHPFPMHOST", "php-fpm-mailcow"),
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
until ping ${REDISHOST} -c1 > /dev/null; do
|
PHPFPMHOST=${PHPFPMHOST:-"php-fpm-mailcow"}
|
||||||
echo "Waiting for Redis..."
|
SOGOHOST=${SOGOHOST:-"$IPV4_NETWORK.248"}
|
||||||
sleep 1
|
RSPAMDHOST=${RSPAMDHOST:-"rspamd-mailcow"}
|
||||||
done
|
|
||||||
until ping ${PHPFPMHOST} -c1 > /dev/null; do
|
until ping ${PHPFPMHOST} -c1 > /dev/null; do
|
||||||
echo "Waiting for PHP..."
|
echo "Waiting for PHP..."
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -382,10 +382,10 @@ services:
|
|||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- SKIP_SOGO=${SKIP_SOGO:-n}
|
- SKIP_SOGO=${SKIP_SOGO:-n}
|
||||||
- SKIP_RSPAMD=${SKIP_RSPAMD:-n}
|
- SKIP_RSPAMD=${SKIP_RSPAMD:-n}
|
||||||
- PHPFPMHOST=${PHPFPMHOST:-php-fpm-mailcow}
|
- PHPFPMHOST=${PHPFPMHOST:-}
|
||||||
- SOGOHOST=${SOGOHOST:-sogo-mailcow}
|
- SOGOHOST=${SOGOHOST:-}
|
||||||
- RSPAMDHOST=${RSPAMDHOST:-rspamd-mailcow}
|
- RSPAMDHOST=${RSPAMDHOST:-}
|
||||||
- REDISHOST=${REDISHOST:-redis-mailcow}
|
- REDISHOST=${REDISHOST:-}
|
||||||
- IPV4_NETWORK=${IPV4_NETWORK:-172.22.1}
|
- IPV4_NETWORK=${IPV4_NETWORK:-172.22.1}
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/web:/web:ro,z
|
- ./data/web:/web:ro,z
|
||||||
|
Loading…
Reference in New Issue
Block a user