fix(docker): enable IPv6 explicitly by env variable (#8449)
Enabling IPv6 address and port for IPv6 addresses caused backward incompatible issues in the docker image. If one wants to use it, it must be turned on explicitly with PORT_IPV6 env variable. Refs #8447 Refs #8437
This commit is contained in:
@@ -39,6 +39,11 @@ if [[ -f "$SWAGGER_JSON" ]]; then
|
||||
sed -i "s|http://example.com/api|$REL_PATH|g" $INITIALIZER_SCRIPT
|
||||
fi
|
||||
|
||||
# enable/disable the address and port for IPv6 addresses that nginx listens on
|
||||
if [[ -n "${PORT_IPV6}" ]]; then
|
||||
sed -i "s|8080;|8080;\n listen [::]:${PORT_IPV6};|g" $NGINX_CONF
|
||||
fi
|
||||
|
||||
# replace the PORT that nginx listens on if PORT is supplied
|
||||
if [[ -n "${PORT}" ]]; then
|
||||
sed -i "s|8080|${PORT}|g" $NGINX_CONF
|
||||
|
||||
Reference in New Issue
Block a user