|
1 | 1 | #!/bin/bash
|
2 | 2 | # install gitlab
|
3 |
| -cd /home/git |
4 |
| -sudo -u git -H git clone --depth=1 https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab |
5 |
| -cd /home/git/gitlab |
6 |
| -sudo -u git -H sh -c "cat config/gitlab.yml.example | sed 's/port: 80/port: 8080/g' > config/gitlab.yml" |
7 |
| -sudo chown -R git log/ |
8 |
| -sudo chown -R git tmp/ |
9 |
| -sudo chmod -R u+rwX log/ |
10 |
| -sudo chmod -R u+rwX tmp/ |
11 |
| -sudo -u git -H mkdir /home/git/gitlab-satellites |
12 |
| -sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites |
13 |
| -sudo chmod -R u+rwX tmp/pids/ |
14 |
| -sudo chmod -R u+rwX tmp/sockets/ |
15 |
| -sudo chmod -R u+rwX public/uploads |
16 |
| -sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb |
17 |
| -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb |
18 |
| -sudo -u git -H git config --global user.name "GitLab" |
19 |
| -sudo -u git -H git config --global user.email "example@example.com" |
20 |
| -sudo -u git -H git config --global core.autocrlf input |
21 |
| -sudo -u git -H sh -c "cat config/database.yml.mysql | sed 's/password: \".*\"/password: "git"/g' > config/database.yml" |
22 |
| -sudo -u git -H chmod o-rwx config/database.yml |
23 |
| -bundle -v |
24 |
| -sudo -u git -H bundle install --deployment --without development test postgres aws |
25 |
| -sudo -u git -H bundle install --deployment --without development test postgres aws |
| 3 | +git clone --depth=1 https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab |
| 4 | +cd /home/travis/gitlab |
| 5 | +sh -c "cat config/gitlab.yml.example | sed 's/port: 80/port: 8080/g' > config/gitlab.yml" |
| 6 | +chmod -R u+rwX log/ |
| 7 | +chmod -R u+rwX tmp/ |
| 8 | +mkdir /home/travis/gitlab-satellites |
| 9 | +chmod u+rwx,g=rx,o-rwx /home/travis/gitlab-satellites |
| 10 | +chmod -R u+rwX tmp/pids/ |
| 11 | +chmod -R u+rwX tmp/sockets/ |
| 12 | +chmod -R u+rwX public/uploads |
| 13 | +cp config/unicorn.rb.example config/unicorn.rb |
| 14 | +cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb |
| 15 | +git config --global user.name "GitLab" |
| 16 | +git config --global user.email "example@example.com" |
| 17 | +git config --global core.autocrlf input |
| 18 | +sh -c "cat config/database.yml.mysql | sed 's/password: \".*\"/password: "git"/g' > config/database.yml" |
| 19 | +chmod o-rwx config/database.yml |
| 20 | +bundle install --deployment --without development test postgres aws |
| 21 | +bundle install --deployment --without development test postgres aws |
26 | 22 | # install gitlab shell
|
27 |
| -sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production |
28 |
| -echo "yes" | sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production |
29 |
| -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab |
30 |
| -sudo update-rc.d gitlab defaults 21 |
31 |
| -sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production |
32 |
| -sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production |
33 |
| -sudo service gitlab restart |
34 |
| -sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production |
| 23 | +bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production |
| 24 | +echo "yes" |bundle exec rake gitlab:setup RAILS_ENV=production |
| 25 | +cp lib/support/init.d/gitlab /etc/init.d/gitlab |
| 26 | +update-rc.d gitlab defaults 21 |
| 27 | +bundle exec rake gitlab:env:info RAILS_ENV=production |
| 28 | +bundle exec rake assets:precompile RAILS_ENV=production |
| 29 | +service gitlab restart |
| 30 | +bundle exec rake gitlab:check RAILS_ENV=production |
35 | 31 |
|
0 commit comments