Skip to content

Instantly share code, notes, and snippets.

@janosgyerik
Created June 9, 2013 22:44
Show Gist options
  • Save janosgyerik/5745578 to your computer and use it in GitHub Desktop.
Save janosgyerik/5745578 to your computer and use it in GitHub Desktop.
Site upgrade script for a Django site using mod_passenger with Apache.
#!/bin/sh -e
#
# Put this script in /path/to/project/local/upgrade.sh
# and customize if necessary
cd $(dirname "$0")/..
projectname=$(basename $(pwd))
. ~/virtualenv/$projectname/bin/activate
unset GIT_DIR
git pull
./manage.py collectstatic --noinput
touch ../tmp/restart.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment