#!/usr/bin/env bash while true;do ls | grep -q dockerbunker.sh;if [[ $? == 0 ]];then BASE_DIR=$PWD;break;else cd ../;fi;done PROPER_NAME="Gitlab CE" SERVICE_NAME="$(echo -e "${PROPER_NAME,,}" | tr -d '[:space:]')" PROMPT_SSL=1 declare -a environment=( "data/env/dockerbunker.env" "data/include/init.sh" ) for env in "${environment[@]}";do [[ -f "${BASE_DIR}"/$env ]] && source "${BASE_DIR}"/$env done declare -A WEB_SERVICES declare -a containers=( "${SERVICE_NAME}-service-dockerbunker" ) declare -a volumes=( "${SERVICE_NAME}-data-vol-1" "${SERVICE_NAME}-conf-vol-1" "${SERVICE_NAME}-log-vol-1" "${SERVICE_NAME}-log-vol-2" ) declare -a add_to_network=( "${SERVICE_NAME}-service-dockerbunker" ) declare -a networks=( ) declare -A IMAGES=( [service]="gitlab/gitlab-ce:latest" ) [[ -z $1 ]] && options_menu configure() { pre_configure_routine echo -e "# \e[4m'${PROPER_NAME}' Settings\e[0m" set_domain cat <<-EOF >> "${SERVICE_ENV}" PROPER_NAME="${PROPER_NAME}" SERVICE_NAME=${SERVICE_NAME} SSL_CHOICE=${SSL_CHOICE} LE_EMAIL=${LE_EMAIL} SERVICE_DOMAIN=${SERVICE_DOMAIN} EOF post_configure_routine } setup() { initial_setup_routine SUBSTITUTE=( "\${SERVICE_DOMAIN}" ) basic_nginx #/proc/sys/fs/file-max #this is shared with the host: GITLAB_FILEMAX=1000000 [[ $(cat /proc/sys/fs/file-max) -lt ${GITLAB_FILEMAX} ]] && echo $GITLAB_FILEMAX > /proc/sys/fs/file-max docker_run_all post_setup_routine } if [[ $1 == "letsencrypt" ]];then $1 $* else $1 fi