[DRE-commits] [gitlab] 03/05: update doc with new way of reading variables
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Thu Apr 20 06:54:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository gitlab.
commit c60a09eae5b76a15bd52d58eabbf44a1858fe4cc
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Thu Apr 20 11:53:38 2017 +0530
update doc with new way of reading variables
---
debian/README.Debian | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 36939a5..dff8a91 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -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'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git
More information about the Pkg-ruby-extras-commits
mailing list