From 7cfaee3ec527a8729a1c299b30eb251b6875eac2 Mon Sep 17 00:00:00 2001 From: Ahmet Demir Date: Tue, 23 Dec 2014 14:31:30 +0100 Subject: [PATCH] Disable IPv6 support for Nginx On some servers, IPv6 is not available, so Nginx can't listen on [::]:80 2014/12/19 07:18:32 [emerg] 484#0: socket() [::]:80 failed (97: Address family not supported by protocol) I removed the line and the container start successfully. --- assets/init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/init b/assets/init index 885bd64b..2fdded81 100755 --- a/assets/init +++ b/assets/init @@ -603,6 +603,11 @@ else sudo -u git -H sed '/{{GITLAB_RELATIVE_URL_ROOT}}/d' -i config/unicorn.rb fi +# disable ipv6 support +if [ ! -f /proc/net/if_inet6 ]; then + sed -e '/listen \[::\]:80/ s/^#*/#/' -i /etc/nginx/sites-enabled/gitlab +fi + # fix permission and ownership of ${GITLAB_DATA_DIR} chmod 755 ${GITLAB_DATA_DIR} chown git:git ${GITLAB_DATA_DIR}