Add IPv6 configuration to docker-entrypoint.sh

This commit is contained in:
upmcplanetracker 2026-07-19 14:49:42 -04:00 committed by GitHub
parent 2ad3cbc4f4
commit 788659a561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

9
docker-entrypoint.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ -f /proc/net/if_inet6 ] && ip -6 addr show lo >/dev/null 2>&1; then
sed -i 's/# IPV6_PLACEHOLDER/listen [::]:80;/' /etc/nginx/conf.d/default.conf
else
sed -i 's/# IPV6_PLACEHOLDER//' /etc/nginx/conf.d/default.conf
fi
exec /docker-entrypoint.sh "$@"