Merge branch 'master' of stigma:platforma
[redakcja.git] / fabfile.py
1 from __future__ import with_statement
2
3 from fabric.api import run, env, cd
4
5 def staging():
6     '''Add staging server to hosts'''
7     env.hosts = ['platforma@stigma.nowoczesnapolska.org.pl:2222']
8     env.project_dir = '/home/platforma/platforma'
9
10 def deploy():
11     '''Deploy server'''
12     with cd(env.project_dir):
13         run('git pull')
14         run('./project/manage.py syncdb')
15     restart_server()
16
17 def restart_server():
18     with cd(env.project_dir):
19         run('touch project/dispatch.wsgi')
20