GitLab - Latest One-Click

by linode
86 deployments · 75 still active · last rev. 11 days ago

Compatible with: Debian 9
Includes: One-Click Helpers
						#!/bin/bash

# Installs Gitlab

#<UDF name="domain" Label="Domain" default=""/>

source <ssinclude StackScriptID="401712">

exec 1> >(tee -a "/var/log/stackscript.log") 2>&1

# Set hostname and update

set_hostname
apt_setup_update

if [[ "$DOMAIN" = "" ]]; then
  DOMAIN=`hostname`
fi

# Install and configure UFW and Fail2ban

ufw_install
ufw allow http
ufw allow https
ufw allow 25
ufw allow 587
ufw allow 110
ufw enable
fail2ban_install

# Pre-seed the postfix options

debconf-set-selections <<< "postfix postfix/mailname string $DOMAIN"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"

# Install postfix

apt-get install curl postfix openssh-server ca-certificates -y

# Add the GitLab package repository

curl -4 -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash

# Install the GitLab package.

EXTERNAL_URL="http://$DOMAIN" apt-get install gitlab-ce
stackscript_cleanup