fabfile.py 574 Bytes
Newer Older
eric's avatar
eric committed
1 2
from fabric.api import run, cd, env, local, sudo

eric's avatar
eric committed
3 4
env.hosts = ['osp@osp.kitchen']
env.path = '/home/osp/apps/vj14/ethertoff'
eric's avatar
eric committed
5 6 7 8 9 10

def getdb():
    pass

def deploy():
    with cd(env.path):
eric's avatar
eric committed
11 12 13
        run('git pull origin vj14')
        run('/home/osp/apps/venvs/vj14/bin/python manage.py collectstatic --noinput')
        sudo('/usr/bin/supervisorctl restart vj14')
eric's avatar
eric committed
14

15 16
def index():
    with cd(env.path):
eric's avatar
eric committed
17
        run('/home/osp/apps/venvs/vj14/bin/python manage.py index')
18 19 20 21 22

def archive():
    local('mkdir -p public')
    local('wget -rk -nH -P ./public http://vj14.stdin.fr/')