Created
December 4, 2018 09:36
-
-
Save cf/7d6755ec4870cbb800942add7a69ef96 to your computer and use it in GitHub Desktop.
install_gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get install -y curl openssh-server ca-certificates | |
sudo apt-get -y update | |
sudo apt-get -y install ca-certificates curl openssh-server postfix | |
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash | |
sudo apt-get -y update | |
sudo apt-get -y install gitlab-ce | |
ROOT_DOMAIN_NAME="$1" | |
GITLAB_DOMAIN_NAME="https://gitlab.$1" | |
REGISTRY_DOMAIN_NAME="https://registry.$1" | |
MATTERMOST_DOMAIN_NAME="https://chat.$1" | |
CONFIG_APPEND=$(cat <<EOF | |
letsencrypt['enable'] = true # GitLab 10.5 and 10.6 require this option | |
letsencrypt['auto_renew_hour'] = "12" | |
letsencrypt['auto_renew_minute'] = "30" | |
letsencrypt['auto_renew_day_of_month'] = "*/7" | |
external_url "$GITLAB_DOMAIN_NAME" # Must use https protocol | |
registry_external_url "$REGISTRY_DOMAIN_NAME" # container registry, must use https protocol | |
mattermost_external_url "$MATTERMOST_DOMAIN_NAME" # mattermost, must use https protocol | |
EOF | |
) | |
sudo echo "$CONFIG_APPEND" >> /etc/gitlab/gitlab.rb | |
sudo gitlab-ctl reconfigure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment