-
-
Save mitio/ebd22257cfb9a53d115471835d56750d to your computer and use it in GitHub Desktop.
Europe Code Week deployment script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
deploy_commands=" | |
source /home/codeeu/.virtualenvs/v1.1.4/bin/activate v1.1.4 && | |
cd /home/codeeu/coding-events && | |
git stash && git pull && git stash pop && | |
pip install -r server-requirements.txt && | |
./manage.py collectstatic --noinput && | |
./manage.py compress --force && | |
./manage.py migrate | |
" | |
echo "Updating code..." | |
su -l -c "$deploy_commands" codeeu | |
echo "Restarting Apache..." | |
service apache2 restart | |
echo "Deploy finished." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment