2011-11-09 18:22:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2011-11-11 04:07:33 +00:00
|
|
|
# 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"
|
2011-11-09 18:22:23 +00:00
|
|
|
|
|
|
|
cd /opt/regluit
|
2011-11-11 04:07:33 +00:00
|
|
|
sudo -u ubuntu /usr/bin/git pull
|
2011-11-09 18:22:23 +00:00
|
|
|
source ENV/bin/activate
|
2012-01-26 15:53:59 +00:00
|
|
|
#pip install -r requirements.pip
|
|
|
|
django-admin.py syncdb --migrate --settings regluit.settings.please
|
|
|
|
django-admin.py collectstatic --noinput --settings regluit.settings.please
|
2011-11-09 18:22:23 +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.please;
|
|
|
|
/etc/init.d/celerybeat restart
|
2012-04-18 16:57:32 +00:00
|
|
|
crontab deploy/crontab_please.txt
|
|
|
|
touch /opt/regluit/deploy/last-update
|