Add compress step to deply
authorCharles Connell <charles@connells.org>
Wed, 23 Apr 2014 17:38:11 +0000 (13:38 -0400)
committerCharles Connell <charles@connells.org>
Wed, 23 Apr 2014 17:38:11 +0000 (13:38 -0400)
fabfile.py

index 88dc5bcc9fabc6df200debfccebf2fd3a5b56a25..bcfa3317d7e0108aeb1d9089e95460fd4b9a3cb3 100644 (file)
@@ -85,6 +85,16 @@ def collect_static():
 
        virtenv_exec('{0}/manage.py collectstatic --noinput'.format(env.code_root))
 
+####### Compress Static Files
+@task
+def compress_static():
+       """
+       Compress static files
+       """
+
+       virtenv_exec('{0}/manage.py compress'.format(env.code_root))
+
+
 ####### Run Dev Server
 @task
 def dev_server():
@@ -297,6 +307,7 @@ def deploy():
     update_code()
     update_reqs()
     syncdb()
+    compress_static()
     collect_static()
     restart_supervisord()
 ########## END COMMANDS