From 6de594d18d8359c9d040e23f95930e3ef23d9e98 Mon Sep 17 00:00:00 2001 From: bobcall Date: Tue, 9 Jul 2013 13:31:33 -0400 Subject: [PATCH] syntax issues --- fabfile.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index 5c909de..84a2a85 100644 --- a/fabfile.py +++ b/fabfile.py @@ -41,7 +41,7 @@ def prod(): env.proj_root = '/var/www/karmaworld' env.proj_dir = '/var/www/karmaworld' env.reqs = 'reqs/prod.txt' - env.confs = 'confs/beta/' + env.confs = 'confs/prod/' env.branch = 'beta' env.run = virtenv_exec env.gunicorn_addr = '127.0.0.1:8000' @@ -57,8 +57,8 @@ def beta(): env.hosts = ['beta.karmanotes.org'] env.proj_root = '/var/www/karmaworld' env.proj_dir = '/var/www/karmaworld' - env.reqs = 'reqs/beta.txt' - env.confs = 'confs/beta/' + env.reqs = 'reqs/prod.txt' + env.confs = 'confs/prod/' env.branch = 'beta' env.run = virtenv_exec env.gunicorn_addr = '127.0.0.1:8000' @@ -206,8 +206,32 @@ def update_code(): env.run('cd %s; git pull' % env.proj_dir) @task -def backup() +def backup(): """ Create backup using bup """ +@task +def first_deploy(): + """ + Sets up and deploys the project for the first time. + """ + make_virtualenv() + update_reqs() + syncdb() + manage_static() + start_supervisord() + + +@task +def deploy(): + """ + Deploys the latest changes + """ + update_code() + update_reqs() + syncdb() + collect_static() + restart_supervisord() +########## END COMMANDS + -- 2.25.1