mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-24 22:25:09 +03:00
Merge pull request #1922 from leojonathanoh/fix/docker-ensure-nginx-does-not-listen-on-ipv6-in-ipv4-only-environments
Fix (docker): Ensure nginx does not listen on ipv6 in ipv4-only environments
This commit is contained in:
commit
ceb9f68ded
1 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,12 @@ UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-25M}
|
||||||
MEMORY_LIMIT=${MEMORY_LIMIT:-128M}
|
MEMORY_LIMIT=${MEMORY_LIMIT:-128M}
|
||||||
SECURE_COOKIES=${SECURE_COOKIES:-true}
|
SECURE_COOKIES=${SECURE_COOKIES:-true}
|
||||||
|
|
||||||
|
# Disable listening on ipv6 for ipv4-only environments, or nginx will fail to start
|
||||||
|
if ! ip a | grep 'inet6 ' > /dev/null; then
|
||||||
|
echo "[INFO] ipv6 is disabled. Configuring nginx to not listen on ipv6"
|
||||||
|
sed -i '/listen \[::\]:/d' /etc/nginx/nginx.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Set attachment size limit
|
# Set attachment size limit
|
||||||
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /usr/local/etc/php-fpm.d/php-fpm.conf /etc/nginx/nginx.conf
|
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /usr/local/etc/php-fpm.d/php-fpm.conf /etc/nginx/nginx.conf
|
||||||
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /usr/local/etc/php-fpm.d/php-fpm.conf
|
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /usr/local/etc/php-fpm.d/php-fpm.conf
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue