-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathfabfile.py
25 lines (21 loc) · 826 Bytes
/
fabfile.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
set(
fab_hosts = ['startthedark.com'],
fab_user = 'startthedark',
)
def unlink_nginx():
'Un-link nginx rules for startthedark.'
sudo('rm -f /etc/nginx/sites-enabled/startthedark.com')
sudo('/etc/init.d/nginx reload')
def link_nginx():
'Link nginx rules for startthedark'
sudo('ln -s /etc/nginx/sites-available/startthedark.com /etc/nginx/sites-enabled/startthedark.com')
sudo('/etc/init.d/nginx reload')
def rebuild_prod_css():
local('bash make_prod_css.sh')
local('git commit -a -m "Rebuilt Prod CSS For Commit"')
local('git push origin master')
def deploy():
'Deploy startthedark.'
run('cd /var/www/startthedark.com/startthedark; git pull;')
run('cd /var/www/startthedark.com/startthedark; /usr/bin/python manage.py syncdb')
sudo('/etc/init.d/apache2 reload')