gitlab-deployment/scripts/install_gitlab.sh

22 lines
510 B
Bash
Executable File

#!/bin/bash
# Install and configure GitLab
set -e
source .env
echo "=== Installing GitLab CE ==="
# Add GitLab repository
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
# Install GitLab
sudo EXTERNAL_URL="https://${GITLAB_DOMAIN}" apt install -y gitlab-ce
# Wait for GitLab to start
echo "Waiting for GitLab to initialize..."
sleep 30
echo "✓ GitLab installed successfully"
echo "Initial root password location: /etc/gitlab/initial_root_password"