Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
36b2f2e3
Commit
36b2f2e3
authored
May 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add deploy recipe extracted from staging server
parent
886f7b63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
lib/support/deploy/deploy.sh
lib/support/deploy/deploy.sh
+44
-0
No files found.
lib/support/deploy/deploy.sh
0 → 100755
View file @
36b2f2e3
# This is deploy script we use to update staging server
# You can always modify it for your needs :)
# If any command return non-zero status - stop deploy
set
-e
echo
'Deploy: Stoping sidekiq..'
cd
/home/git/gitlab/
&&
sudo
-u
git
-H
bundle
exec
rake sidekiq:stop
RAILS_ENV
=
production
echo
'Deploy: Show deploy index page'
sudo
-u
git
-H
cp
/home/git/gitlab/public/deploy.html /home/git/gitlab/public/index.html
echo
'Deploy: Starting backup...'
cd
/home/git/gitlab/
&&
sudo
-u
git
-H
bundle
exec
rake gitlab:backup:create
RAILS_ENV
=
production
echo
'Deploy: Stop GitLab server'
sudo
service gitlab stop
echo
'Deploy: Get latest code'
cd
/home/git/gitlab/
# clean working directory
sudo
-u
git
-H
git stash
# change branch to
sudo
-u
git
-H
git pull origin master
echo
'Deploy: Bundle and migrate'
# change it to your needs
sudo
-u
git
-H
bundle
--without
postgres
sudo
-u
git
-H
bundle
exec
rake db:migrate
RAILS_ENV
=
production
# return stashed changes (if necessary)
# sudo -u git -H git stash pop
echo
'Deploy: Starting GitLab server...'
sudo
service gitlab start
sleep
10
sudo
-u
git
-H
rm
/home/git/gitlab/public/index.html
echo
'Deploy: Done'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment