-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabfile-v1.py
28 lines (23 loc) · 964 Bytes
/
fabfile-v1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from fabric.api import *
env.hosts = ['natebeaty.opalstacked.com']
env.user = 'natebeaty'
env.warn_only = True
def deploy(assets='n'):
with cd('/home/natebeaty/apps/corpsey/corpsey/'):
# run('/home/natebeaty/.virtualenvs/corpsey_110/bin/activate_this.py')
run('git pull origin master')
if assets != 'n':
run('/home/natebeaty/apps/corpsey/env/bin/python manage.py collectstatic --noinput')
run('/home/natebeaty/apps/corpsey/env/bin/python manage.py clearcache')
restart()
def syncdb():
with cd('/home/natebeaty/apps/corpsey/corpsey/'):
run('/home/natebeaty/apps/corpsey/env/bin/python manage.py syncdb')
restart()
def migrate():
with cd('/home/natebeaty/apps/corpsey/corpsey/'):
run('/home/natebeaty/apps/corpsey/env/bin/python manage.py migrate')
restart()
def restart():
run('/home/natebeaty/apps/corpsey/stop')
run('/home/natebeaty/apps/corpsey/start')