From 1c4e929b33c856bf4ae87dafaf9121117bf7149c Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 7 Dec 2015 18:19:59 -0200 Subject: [PATCH] Use gitlab user and home to run bundle --- cookbooks/gitlab/recipes/default.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/gitlab/recipes/default.rb b/cookbooks/gitlab/recipes/default.rb index 0834914..001bed9 100644 --- a/cookbooks/gitlab/recipes/default.rb +++ b/cookbooks/gitlab/recipes/default.rb @@ -100,6 +100,8 @@ execute 'selinux-gitlab' do end execute 'fix-relative-url-for-assets' do + user 'git' + cwd '/usr/lib/gitlab' command 'sed -i \'s/# config.relative_url_root = "\/gitlab"/config.relative_url_root = "\/gitlab"/\' /usr/lib/gitlab/config/application.rb' - command 'sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production' + command 'bundle exec rake assets:precompile RAILS_ENV=production' end -- libgit2 0.21.2