From cdcedd5b26fcabba451747f37fd2942fe6775410 Mon Sep 17 00:00:00 2001 From: 3kami3 Date: Tue, 19 Jan 2016 22:17:21 +0900 Subject: [PATCH] Add an option to supply root email through an environmental variable. --- CHANGELOG | 1 + db/fixtures/production/001_admin.rb | 4 +++- doc/install/installation.md | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 983a219703a..488b68000df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 8.5.0 (unreleased) - Ensure rake tasks that don't need a DB connection can be run without one - Update New Relic gem to 3.14.1.311 (Stan Hu) - Add "visibility" flag to GET /projects api endpoint + - Add an option to supply root email through an environmental variable (Koichiro Mikami) - Ignore binary files in code search to prevent Error 500 (Stan Hu) - Render sanitized SVG images (Stan Hu) - Support download access by PRIVATE-TOKEN header (Stan Hu) diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb index b0c0b6450f6..308b0528c9b 100644 --- a/db/fixtures/production/001_admin.rb +++ b/db/fixtures/production/001_admin.rb @@ -6,8 +6,10 @@ else expire_time = nil end +email = ENV['GITLAB_ROOT_EMAIL'].presence || 'admin@example.com' + admin = User.create( - email: "admin@example.com", + email: email, name: "Administrator", username: 'root', password: password, diff --git a/doc/install/installation.md b/doc/install/installation.md index 3eb9b1767c5..39c9b12ade9 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -373,9 +373,9 @@ GitLab Shell is an SSH access and repository management software developed speci # When done you see 'Administrator account created:' -**Note:** You can set the Administrator/root password by supplying it in environmental variable `GITLAB_ROOT_PASSWORD` as seen below. If you don't set the password (and it is set to the default one) please wait with exposing GitLab to the public internet until the installation is done and you've logged into the server the first time. During the first login you'll be forced to change the default password. +**Note:** You can set the Administrator/root password and e-mail by supplying them in environmental variables, `GITLAB_ROOT_PASSWORD` and `GITLAB_ROOT_EMAIL` respectively, as seen below. If you don't set the password (and it is set to the default one) please wait with exposing GitLab to the public internet until the installation is done and you've logged into the server the first time. During the first login you'll be forced to change the default password. - sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword + sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword GITLAB_ROOT_EMAIL=youremail ### Secure secrets.yml