mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2025-12-08 17:36:24 +00:00
Fix: HealthCheck Script will Fail if the ENV GITLAB_HTTPS set True
This commit is contained in:
parent
137376feb7
commit
def7ef5fea
@ -1641,9 +1641,13 @@ update_ssh_listen_port() {
|
||||
generate_healthcheck_script() {
|
||||
# configure healthcheck script
|
||||
## https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html
|
||||
local HEALTHCHECK_PROTOCOL="http"
|
||||
if [[ "${GITLAB_HTTPS}" == true ]]; then
|
||||
HEALTHCHECK_PROTOCOL="${HEALTHCHECK_PROTOCOL}s"
|
||||
fi
|
||||
cat > /usr/local/sbin/healthcheck <<EOF
|
||||
#!/bin/bash
|
||||
url=http://localhost${GITLAB_RELATIVE_URL_ROOT}/-/liveness
|
||||
url=${HEALTHCHECK_PROTOCOL}://localhost${GITLAB_RELATIVE_URL_ROOT}/-/liveness
|
||||
options=( '--insecure' '--location' '--silent' )
|
||||
curl "\${options[@]}" \$url
|
||||
[[ "\$(curl \${options[@]} -o /dev/null -I -w '%{http_code}' \$url)" == "200" ]]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user