2012-05-07 18:44:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# this script is used by jenkins to remotely update a regluit instance
|
|
|
|
# for it to work the jenkins user's public ssh key needs to be in the
|
|
|
|
# authorized key for the machine running the regluit instance
|
|
|
|
# you can then put something like this in a post build configuration
|
|
|
|
# ssh ubuntu@please.unglueit.com "/opt/regluit/deploy/update-regluit"
|
|
|
|
|
|
|
|
cd /opt/regluit
|
2016-09-12 18:30:25 +00:00
|
|
|
find . -name "*.pyc" -delete
|
|
|
|
find . -type d -empty -delete
|
|
|
|
|
2012-05-07 18:44:01 +00:00
|
|
|
sudo -u ubuntu /usr/bin/git pull
|
|
|
|
source ENV/bin/activate
|
2014-10-16 22:18:06 +00:00
|
|
|
pip install --upgrade -r requirements_versioned.pip
|
2016-09-08 02:24:47 +00:00
|
|
|
#django-admin.py syncdb --migrate --settings regluit.settings.just
|
|
|
|
django-admin.py migrate --fake-initial --noinput --settings regluit.settings.just
|
2012-05-07 18:44:01 +00:00
|
|
|
django-admin.py collectstatic --noinput --settings regluit.settings.just
|
2014-10-11 00:00:28 +00:00
|
|
|
|
2012-05-07 18:44:01 +00:00
|
|
|
sudo /etc/init.d/apache2 restart
|
2016-06-28 19:05:38 +00:00
|
|
|
django-admin.py celeryd_multi restart w1 --settings=regluit.settings.just;
|
|
|
|
/etc/init.d/celerybeat restart
|
2012-05-07 18:44:01 +00:00
|
|
|
crontab deploy/crontab_just.txt
|
|
|
|
touch /opt/regluit/deploy/last-update
|