summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 08:22:06 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 08:22:06 +0000
commit745f262c1634aed65cc3f225a36b53d38e32be41 (patch)
treec43664b6892036181c3ec519d0ab30dd3648a824
parentd7ab859b911dba7a035ee67047ccd5cbd6e33c73 (diff)
parent09e64ae605914656e2b928dad0dce5df28b6f9a2 (diff)
downloadgitlab-ce-745f262c1634aed65cc3f225a36b53d38e32be41.tar.gz
Merge branch 'root_password_configurable' into 'master'
Root password configurable through environmental variable Fixes #1522 See merge request !1084
-rw-r--r--db/fixtures/production/001_admin.rb12
-rw-r--r--doc/install/installation.md4
2 files changed, 13 insertions, 3 deletions
diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb
index c00ba3c10ba..21c10f31923 100644
--- a/db/fixtures/production/001_admin.rb
+++ b/db/fixtures/production/001_admin.rb
@@ -1,9 +1,15 @@
+password = if ENV['GITLAB_ROOT_PASSWORD'].nil? || ENV['GITLAB_ROOT_PASSWORD'].empty?
+ "5iveL!fe"
+ else
+ ENV['GITLAB_ROOT_PASSWORD']
+ end
+
admin = User.create(
email: "admin@example.com",
name: "Administrator",
username: 'root',
- password: "5iveL!fe",
- password_confirmation: "5iveL!fe",
+ password: password,
+ password_confirmation: password,
password_expires_at: Time.now,
theme_id: Gitlab::Theme::MARS
@@ -19,6 +25,6 @@ puts %q[
Administrator account created:
login.........root
-password......5iveL!fe
+password......#{password}
]
end
diff --git a/doc/install/installation.md b/doc/install/installation.md
index 7a0b4e1f934..5ad8392fb63 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -244,6 +244,10 @@ 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 password by supplying it in environmental variable `GITLAB_ROOT_PASSWORD`, eg.:
+
+ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=newpassword
+
### Install Init Script
Download the init script (will be `/etc/init.d/gitlab`):