mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-25 02:29:32 +02:00
[Compose] Expose SQL to 13306 on 127.0.0.1
This commit is contained in:
parent
520bc6950f
commit
6118085890
@ -32,6 +32,8 @@ services:
|
||||
restart: always
|
||||
dns:
|
||||
- ${IPV4_NETWORK}.254
|
||||
ports:
|
||||
- "${SQL_PORT:-127.0.0.1:13306}:3306"
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
|
||||
networks:
|
||||
|
@ -74,6 +74,7 @@ POP_PORT=110
|
||||
POPS_PORT=995
|
||||
SIEVE_PORT=4190
|
||||
DOVEADM_PORT=127.0.0.1:19991
|
||||
SQL_PORT=127.0.0.1:13306
|
||||
|
||||
# Your timezone
|
||||
TZ=${TZ}
|
||||
@ -108,6 +109,9 @@ IPV4_NETWORK=172.22.1
|
||||
# Internal IPv6 subnet in fc00::/7
|
||||
IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
|
||||
|
||||
# Use this IP for outgoing connections (SNAT)' >> mailcow.conf
|
||||
#SNAT_TO_SOURCE=" >> mailcow.conf
|
||||
|
||||
# Disable IPv6
|
||||
# mailcow-network will still be created as IPv6 enabled, all containers will be created
|
||||
# without IPv6 support.
|
||||
|
@ -43,6 +43,7 @@ CONFIG_ARRAY=(
|
||||
"LOG_LINES"
|
||||
"SNAT_TO_SOURCE"
|
||||
"SYSCTL_IPV6_DISABLED"
|
||||
"SQL_PORT"
|
||||
)
|
||||
|
||||
sed -i '$a\' mailcow.conf
|
||||
@ -94,6 +95,12 @@ for option in ${CONFIG_ARRAY[@]}; do
|
||||
echo '# Internal IPv6 subnet in fc00::/7' >> mailcow.conf
|
||||
echo "IPV6_NETWORK=fd4d:6169:6c63:6f77::/64" >> mailcow.conf
|
||||
fi
|
||||
elif [[ ${option} == "SQL_PORT" ]]; then
|
||||
if ! grep -q ${option} mailcow.conf; then
|
||||
echo "Adding new option \"${option}\" to mailcow.conf"
|
||||
echo '# Bind SQL to 127.0.0.1 on port 13306' >> mailcow.conf
|
||||
echo "SQL_PORT=127.0.0.1:13306" >> mailcow.conf
|
||||
fi
|
||||
elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then
|
||||
if ! grep -q ${option} mailcow.conf; then
|
||||
echo "Adding new option \"${option}\" to mailcow.conf"
|
||||
|
Loading…
Reference in New Issue
Block a user