Commit e4465569599c90185f07c6ea4a62b820c5e4b0d0

Authored by Lucas Kanashiro
Committed by Sergio Oliveira
1 parent 63f06439

Refactored gitlab script

Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
scripts/gitlab.sh
@@ -56,30 +56,30 @@ sudo -iu git rvm use 2.0.0@gitlab --default @@ -56,30 +56,30 @@ sudo -iu git rvm use 2.0.0@gitlab --default
56 sudo -iu git gem install bundler --no-ri --no-rdoc 56 sudo -iu git gem install bundler --no-ri --no-rdoc
57 sudo -iu git /usr/local/bin/git clone https://gitlab.com/gitlab-org/gitlab-shell.git 57 sudo -iu git /usr/local/bin/git clone https://gitlab.com/gitlab-org/gitlab-shell.git
58 sudo -iu git /usr/local/bin/git --git-dir=/home/git/gitlab-shell/.git --work-tree=/home/git/gitlab-shell/ reset --hard v1.9.3 58 sudo -iu git /usr/local/bin/git --git-dir=/home/git/gitlab-shell/.git --work-tree=/home/git/gitlab-shell/ reset --hard v1.9.3
59 -sudo su - git -c 'cat /home/git/gitlab-shell/config.yml.example > /home/git/gitlab-shell/config.yml' 59 +sudo -u git cp /home/git/gitlab-shell/config.yml.example /home/git/gitlab-shell/config.yml
60 sudo -iu git ruby /home/git/gitlab-shell/bin/install 60 sudo -iu git ruby /home/git/gitlab-shell/bin/install
61 sudo restorecon -Rv /home/git/.ssh 61 sudo restorecon -Rv /home/git/.ssh
62 62
63 sudo -iu git /usr/local/bin/git clone https://github.com/colab-community/gitlabhq.git -b spb-stable /home/git/gitlab 63 sudo -iu git /usr/local/bin/git clone https://github.com/colab-community/gitlabhq.git -b spb-stable /home/git/gitlab
64 -sudo su - git 'cat /home/git/gitlab/config/gitlab.yml.example > /home/git/gitlab/config/gitlab.yml' 64 +sudo -u git cp /home/git/gitlab/config/gitlab.yml.example /home/git/gitlab/config/gitlab.yml
65 65
66 sudo -iu git mkdir /home/git/gitlab-satellites 66 sudo -iu git mkdir /home/git/gitlab-satellites
67 sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites 67 sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
68 -sudo su - git -c 'cat /home/git/gitlab/config/unicorn.rb.example > /home/git/gitlab/config/unicorn.rb'  
69 -sudo su - git -c 'cat /home/git/gitlab/config/initializers/rack_attack.rb.example > /home/git/gitlab/config/initializers/rack_attack.rb' 68 +sudo -u git cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb
  69 +sudo -u git cp /home/git/gitlab/config/initializers/rack_attack.rb.example /home/git/gitlab/config/initializers/rack_attack.rb
70 sudo sed -i "s/gitlab_url: \"http:\/\/localhost\/\"/gitlab_url: \"http:\/\/$2:8090\/gitlab\//" /home/git/gitlab-shell/config.yml 70 sudo sed -i "s/gitlab_url: \"http:\/\/localhost\/\"/gitlab_url: \"http:\/\/$2:8090\/gitlab\//" /home/git/gitlab-shell/config.yml
71 71
72 sudo -iu git /usr/local/bin/git config --global user.name "GitLab" 72 sudo -iu git /usr/local/bin/git config --global user.name "GitLab"
73 sudo -iu git /usr/local/bin/git config --global user.email "gitlab@localhost" 73 sudo -iu git /usr/local/bin/git config --global user.email "gitlab@localhost"
74 sudo -iu git /usr/local/bin/git config --global core.autocrlf input 74 sudo -iu git /usr/local/bin/git config --global core.autocrlf input
75 sudo chmod o-rwx /home/git/gitlab/config/database.yml 75 sudo chmod o-rwx /home/git/gitlab/config/database.yml
76 -sudo su - git -c "echo 'production: 76 +sudo -u git echo "production:
77 adapter: postgresql 77 adapter: postgresql
78 encoding: unicode 78 encoding: unicode
79 database: gitlabhq_production 79 database: gitlabhq_production
80 pool: 10 80 pool: 10
81 username: git 81 username: git
82 - host: $DATABASE_HOST' > /home/git/gitlab/config/database.yml" 82 + host: $DATABASE_HOST" > /home/git/gitlab/config/database.yml
83 83
84 # Baixando as dependencias, criando o banco, instalando de fato 84 # Baixando as dependencias, criando o banco, instalando de fato
85 sudo su - git -c 'cd /home/git/gitlab && bundle config build.pg' 85 sudo su - git -c 'cd /home/git/gitlab && bundle config build.pg'