Commit 6c23dbae authored by Jordi Pujol Ahulló's avatar Jordi Pujol Ahulló

issue560 - added one line upgrade command

parent 52a12893
......@@ -27,3 +27,33 @@ bundle exec rake db:migrate RAILS_ENV=production
### 5. Start web application
sudo service gitlab_ci start
# One line upgrade command
You have read through the entire guide and probably already did all the steps one by one.
Here is a one line command with all above steps for the next time you upgrade:
```
sudo service gitlab_ci stop && \
cd /home/gitlab_ci/gitlab-ci && \
sudo -u gitlab_ci -H git pull origin `git rev-parse --abbrev-ref HEAD` && \
sudo -u gitlab_ci -H bundle install --without development test --deployment && \
sudo -u gitlab_ci -H bundle exec rake db:migrate RAILS_ENV=production && \
cd && \
sudo service gitlab_ci start
```
Since when we start this `gitlab_ci` service, the document `db/schema.rb` is shown always as modified for git, you could even do like this, **if and only if**, you are sure you only have that modification:
```
sudo service gitlab_ci stop && \
cd /home/gitlab_ci/gitlab-ci && \
sudo -u gitlab_ci -H git checkout -f `git rev-parse --abbrev-ref HEAD` && \
sudo -u gitlab_ci -H git pull origin `git rev-parse --abbrev-ref HEAD` && \
sudo -u gitlab_ci -H bundle install --without development test --deployment && \
sudo -u gitlab_ci -H bundle exec rake db:migrate RAILS_ENV=production && \
cd && \
sudo service gitlab_ci start
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment