start: added GITLAB_EMAIL env variable to specify the email address from the git user

This commit is contained in:
Sameer Naik 2013-10-09 01:05:37 +05:30
parent 3629b9ea43
commit 044c2dd2ea

View File

@ -1,6 +1,7 @@
#!/bin/bash
GITLAB_HOST=${GITLAB_HOST:-localhost}
GITLAB_EMAIL=${GITLAB_EMAIL:-gitlab@localhost}
DB_HOST=${DB_HOST:-localhost}
DB_NAME=${DB_NAME:-gitlabhq_production}
@ -25,11 +26,12 @@ sleep 3
# configure git for the 'git' user
sudo -u git -H git config --global user.name "GitLab"
sudo -u git -H git config --global user.email "gitlab@localhost"
sudo -u git -H git config --global user.email "${GITLAB_EMAIL}"
sudo -u git -H git config --global core.autocrlf input
# configure server url
sudo -u git -H sed 's/host: localhost/host: '${GITLAB_HOST}'/' -i /home/git/gitlab/config/gitlab.yml
sudo -u git -H sed 's/email_from: gitlab@localhost/email_from: '${GITLAB_EMAIL}'/' -i /home/git/gitlab/config/gitlab.yml
# configure database
sudo -u git -H sed 's/{{DB_HOST}}/'${DB_HOST}'/' -i /home/git/gitlab/config/database.yml