Mercurial > public > bravenewsurf
view fabfile.py @ 107:89d0511cb5c2
Update fabric file for production server (finally!).
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 15 Oct 2013 21:00:21 -0500 |
parents | 1eb4b4072888 |
children |
line wrap: on
line source
from fabric.api import cd, run PYTHON = '/svr/django-sites/bns/bin/python' WC_DIR = '/svr/django-sites/bns/bravenewsurf' PROJ_DIR = WC_DIR + '/bns_website' def update(): """ Runs hg pull -u. """ with cd(WC_DIR): run('hg pull --update') def collectstatic(): """ Runs the staticfiles collectstatic command to deploy static assets. """ cmd = ('%s manage.py collectstatic ' '--settings=settings.production --noinput') % PYTHON with cd(PROJ_DIR): run(cmd) def cleanup(): """ Runs the cleanup management command. """ cmd = '%s manage.py cleanup --settings=settings.production' % PYTHON with cd(PROJ_DIR): run(cmd) def touch(): """ Touches the wsgi file to reload the Python code. """ with cd(PROJ_DIR): run('touch apache/bns.wsgi')