mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-25 14:08:09 +00:00
ssl: check if required files exist before enabling https support
This commit is contained in:
parent
e69a39af1e
commit
f5f7e7786a
12
assets/init
12
assets/init
@ -90,6 +90,18 @@ case "${DB_TYPE}" in
|
||||
*) echo "Unsupported database adapter. Available adapters are mysql and postgres." && exit 1 ;;
|
||||
esac
|
||||
|
||||
if [ "${GITLAB_HTTPS}" == "true" ]; then
|
||||
# make sure the required files exist
|
||||
if [ ! -f "${SSL_CERTIFICATE_PATH}" -o ! -f "${SSL_KEY_PATH}" -o ! -f "${SSL_DHPARAM_PATH}" ]; then
|
||||
echo ""
|
||||
echo " WARNING: "
|
||||
echo " Files required for HTTPS support cannot be found"
|
||||
echo " Disabling https support."
|
||||
echo ""
|
||||
GITLAB_HTTPS="false"
|
||||
fi
|
||||
fi
|
||||
|
||||
case "${GITLAB_HTTPS}" in
|
||||
true)
|
||||
GITLAB_URL="https://${GITLAB_HOST}${GITLAB_PORT:+:$GITLAB_PORT}/"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user