[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
|
restart: always
|
||||||
dns:
|
dns:
|
||||||
- ${IPV4_NETWORK}.254
|
- ${IPV4_NETWORK}.254
|
||||||
|
ports:
|
||||||
|
- "${SQL_PORT:-127.0.0.1:13306}:3306"
|
||||||
sysctls:
|
sysctls:
|
||||||
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
|
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
|
||||||
networks:
|
networks:
|
||||||
|
@ -74,6 +74,7 @@ POP_PORT=110
|
|||||||
POPS_PORT=995
|
POPS_PORT=995
|
||||||
SIEVE_PORT=4190
|
SIEVE_PORT=4190
|
||||||
DOVEADM_PORT=127.0.0.1:19991
|
DOVEADM_PORT=127.0.0.1:19991
|
||||||
|
SQL_PORT=127.0.0.1:13306
|
||||||
|
|
||||||
# Your timezone
|
# Your timezone
|
||||||
TZ=${TZ}
|
TZ=${TZ}
|
||||||
@ -108,6 +109,9 @@ IPV4_NETWORK=172.22.1
|
|||||||
# Internal IPv6 subnet in fc00::/7
|
# Internal IPv6 subnet in fc00::/7
|
||||||
IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
|
IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
|
||||||
|
|
||||||
|
# Use this IP for outgoing connections (SNAT)' >> mailcow.conf
|
||||||
|
#SNAT_TO_SOURCE=" >> mailcow.conf
|
||||||
|
|
||||||
# Disable IPv6
|
# Disable IPv6
|
||||||
# mailcow-network will still be created as IPv6 enabled, all containers will be created
|
# mailcow-network will still be created as IPv6 enabled, all containers will be created
|
||||||
# without IPv6 support.
|
# without IPv6 support.
|
||||||
|
@ -43,6 +43,7 @@ CONFIG_ARRAY=(
|
|||||||
"LOG_LINES"
|
"LOG_LINES"
|
||||||
"SNAT_TO_SOURCE"
|
"SNAT_TO_SOURCE"
|
||||||
"SYSCTL_IPV6_DISABLED"
|
"SYSCTL_IPV6_DISABLED"
|
||||||
|
"SQL_PORT"
|
||||||
)
|
)
|
||||||
|
|
||||||
sed -i '$a\' mailcow.conf
|
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 '# Internal IPv6 subnet in fc00::/7' >> mailcow.conf
|
||||||
echo "IPV6_NETWORK=fd4d:6169:6c63:6f77::/64" >> mailcow.conf
|
echo "IPV6_NETWORK=fd4d:6169:6c63:6f77::/64" >> mailcow.conf
|
||||||
fi
|
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
|
elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then
|
||||||
if ! grep -q ${option} mailcow.conf; then
|
if ! grep -q ${option} mailcow.conf; then
|
||||||
echo "Adding new option \"${option}\" to mailcow.conf"
|
echo "Adding new option \"${option}\" to mailcow.conf"
|
||||||
|
Loading…
Reference in New Issue
Block a user