regluit/deploy/update-regluit

22 lines
877 B
Bash
Executable File

#!/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
find . -name "*.pyc" -delete
find . -type d -empty -delete
sudo -u ubuntu /usr/bin/git pull
source ENV/bin/activate
#pip install -r requirements.pip
django-admin.py syncdb --migrate --settings regluit.settings.please
django-admin.py collectstatic --noinput --settings regluit.settings.please
sudo /etc/init.d/apache2 restart
django-admin.py celeryd_multi restart w1 --settings=regluit.settings.please;
/etc/init.d/celerybeat restart
crontab deploy/crontab_please.txt
touch /opt/regluit/deploy/last-update