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:
Vladimír Gorej
2023-03-07 14:38:07 +01:00
committed by GitHub
parent 78697221a2
commit 51f8ccb018
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -30,7 +30,6 @@ http {
server {
listen 8080;
listen [::]:8080;
server_name localhost;
index index.html index.htm;