update doc with new way of reading variables
This commit is contained in:
parent
755450b380
commit
c60a09eae5
1 changed files with 4 additions and 4 deletions
8
debian/README.Debian
vendored
8
debian/README.Debian
vendored
|
@ -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
|
directory /usr/share/gitlab and with the environment variables from
|
||||||
/etc/gitlab/gitlab-debian.conf set. So above command could be run like:
|
/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:
|
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 f -exec chmod 0644 {} \;
|
||||||
$ find /var/lib/gitlab/public/uploads -type d -not -path /var/lib/gitlab/public/uploads -exec chmod 0700 {} \;
|
$ find /var/lib/gitlab/public/uploads -type d -not -path /var/lib/gitlab/public/uploads -exec chmod 0700 {} \;
|
||||||
10. Migrate the database:
|
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:
|
11. Fix hooks:
|
||||||
# su gitlab
|
# su gitlab
|
||||||
$ /usr/share/gitlab-shell/bin/create-hooks
|
$ /usr/share/gitlab-shell/bin/create-hooks
|
||||||
12. Start gitlab:
|
12. Start gitlab:
|
||||||
$ systemctl start gitlab.service
|
$ systemctl start gitlab.service
|
||||||
13. Check the installation:
|
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
|
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):001:0> user = User.where(admin: true).first
|
||||||
irb(main):002:0> user.password = 'secret_pass'
|
irb(main):002:0> user.password = 'secret_pass'
|
||||||
irb(main):003:0> user.password_confirmation = 'secret_pass'
|
irb(main):003:0> user.password_confirmation = 'secret_pass'
|
||||||
|
|
Loading…
Reference in a new issue