fix: healthcheck and GITLAB_HTTPS=true

Follow redirects
Allow connections to SSL sites without certs
This commit is contained in:
Carlos Álvaro 2020-05-27 16:34:58 +02:00 committed by Niclas Mietz
parent c250de7579
commit 31325c1007

View File

@ -431,8 +431,9 @@ EOF
cat > /usr/local/sbin/healthcheck <<EOF
#!/bin/bash
url=http://localhost/-/liveness
curl -s \$url
[[ "\$(curl -s -o /dev/null -I -w '%{http_code}' \$url)" == "200" ]]
options=( '--insecure' '--location' '--silent' )
curl "\${options[@]}" \$url
[[ "\$(curl \${options[@]} -o /dev/null -I -w '%{http_code}' \$url)" == "200" ]]
EOF
chmod +x /usr/local/sbin/healthcheck