X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e5e8226c4d4bd610de5983e69b1b13684a17fe75..f16a0ea5826b6ca41abca50c462de0f852e3ec5c:/fabfile.py?ds=sidebyside diff --git a/fabfile.py b/fabfile.py index 84605a200..30bce6655 100644 --- a/fabfile.py +++ b/fabfile.py @@ -29,7 +29,7 @@ def production(): env.path = '/srv/wolnelektury.pl' env.python = '/usr/bin/python' env.virtualenv = '/usr/bin/virtualenv' - env.pip = '/usr/bin/pip' + env.pip = 've/bin/pip' # ========= # = Tasks = @@ -70,6 +70,7 @@ def deploy(): copy_localsettings() symlink_current_release() migrate() + collectstatic() restart_webserver() def deploy_version(version): @@ -160,6 +161,13 @@ def migrate(): if env.use_south: run('../../../ve/bin/python manage.py migrate' % env, pty=True) +def collectstatic(): + """Collect static files""" + print '>>> collectstatic' + require('project_name', provided_by=[staging, production]) + with cd('%(path)s/releases/current/%(project_name)s' % env): + run('../../../ve/bin/python manage.py collectstatic --noinput' % env, pty=True) + def restart_webserver(): "Restart the web server" print '>>> restart webserver'