Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded ipv6 in nginx.conf breaks deployment #422

Open
k2patel opened this issue Oct 31, 2024 · 2 comments
Open

Hardcoded ipv6 in nginx.conf breaks deployment #422

k2patel opened this issue Oct 31, 2024 · 2 comments

Comments

@k2patel
Copy link

k2patel commented Oct 31, 2024

Issue caused by #385 , Causing deployment to break.

  • When ipv6 is disable at kernel level and docker level, it does not have any address ::0 where nginx can bind and fails to start.
@k2patel
Copy link
Author

k2patel commented Oct 31, 2024

I believe the better option to use the entrypoint.sh to modify the file based on sysctl value..

@k2patel
Copy link
Author

k2patel commented Oct 31, 2024

i guess something like..

# Check if IPv6 is enabled on the host
if sysctl -a | grep -q 'net.ipv6.conf.all.disable_ipv6 = 0'; then
    # Enable IPv6 configuration in nginx.conf
    sed -i 's/#listen \[::0\]:80;/listen [::0]:80;/' /etc/nginx/nginx.conf
else
    # Disable IPv6 configuration in nginx.conf
    sed -i 's/listen \[::0\]:80;/#listen [::0]:80;/' /etc/nginx/nginx.conf
fi

@k2patel k2patel changed the title Hardcoded ipv6 breaks deployment Hardcoded ipv6 in nginx.conf breaks deployment Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant