Skip to content

Instantly share code, notes, and snippets.

@luismasuelli
Created March 9, 2015 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luismasuelli/82410828ebf11fbe7662 to your computer and use it in GitHub Desktop.
Save luismasuelli/82410828ebf11fbe7662 to your computer and use it in GitHub Desktop.
Implementacion de post-receive para poner en los git de webfaction de aplicaciones django regulares
#!/bin/sh
#myuser: account user @ webfaction
#mydeploy: web application name (when created in webfaction's cpanel interface)
#mydjangoprj: however is named the django project inside the application
# (NOTES: if project name is changed, the apache wsgi files must be changed accordingly)
GIT_WORK_TREE=/home/myuser/webapps/mydeploy/mydjangoprj git checkout -f master
GIT_WORK_TREE=/home/myuser/webapps/mydeploy/mydjangoprj git reset --hard
cd /home/myuser/webapps/mydeploy/mydjangoprj
#pip install --upgrade -r /home/myuser/webapps/mydeploy/mydjangoprj/requirements.txt
python2.7 manage.py collectstatic --noinput
python2.7 manage.py migrate
python2.7 manage.py compilemessages
/home/myuser/webapps/mydjangoprj/apache2/bin/start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment