update doc with new way of reading variables

This commit is contained in:
Praveen Arimbrathodiyil 2017-04-20 11:53:38 +05:30
parent 755450b380
commit c60a09eae5

View file

@ -64,7 +64,7 @@ In Debian, the rake command has to be called by the gitlab user from app home
directory /usr/share/gitlab and with the environment variables from
/etc/gitlab/gitlab-debian.conf set. So above command could be run like:
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && export $(cat /etc/gitlab/gitlab-debian.conf) && rake XXX RAILS_ENV=production'
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && rake XXX RAILS_ENV=production'
One useful command to run in this environment is:
@ -120,19 +120,19 @@ Migrating from non-Debian gitlab
$ find /var/lib/gitlab/public/uploads -type f -exec chmod 0644 {} \;
$ find /var/lib/gitlab/public/uploads -type d -not -path /var/lib/gitlab/public/uploads -exec chmod 0700 {} \;
10. Migrate the database:
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && export $(cat /etc/gitlab/gitlab-debian.conf) && rake db:migrate RAILS_ENV=production'
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && rake db:migrate RAILS_ENV=production'
11. Fix hooks:
# su gitlab
$ /usr/share/gitlab-shell/bin/create-hooks
12. Start gitlab:
$ systemctl start gitlab.service
13. Check the installation:
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && export $(cat /etc/gitlab/gitlab-debian.conf) && rake gitlab:check RAILS_ENV=production'
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && rake gitlab:check RAILS_ENV=production'
Resetting admin password without web interface
==============================================
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && export $(cat /etc/gitlab/gitlab-debian.conf) && rails console production'
$ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && rails console production'
irb(main):001:0> user = User.where(admin: true).first
irb(main):002:0> user.password = 'secret_pass'
irb(main):003:0> user.password_confirmation = 'secret_pass'