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
|
sed -i "s|http://example.com/api|$REL_PATH|g" $INITIALIZER_SCRIPT
|
||||||
fi
|
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
|
# replace the PORT that nginx listens on if PORT is supplied
|
||||||
if [[ -n "${PORT}" ]]; then
|
if [[ -n "${PORT}" ]]; then
|
||||||
sed -i "s|8080|${PORT}|g" $NGINX_CONF
|
sed -i "s|8080|${PORT}|g" $NGINX_CONF
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ http {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
listen [::]:8080;
|
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user