Created
December 14, 2012 11:59
-
-
Save malteo/4284938 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import cd, env, local, prefix, run, sudo | |
env.hosts = ['cs01.actalis.vpn'] | |
env.project_root = '/home/libersoft/visalaid' | |
env.user = 'libersoft' | |
def push(): | |
local('git push') | |
def collect_static(): | |
with prefix('source venv/bin/activate'): | |
run('python manage.py collectstatic -v0 --noinput') | |
def pull(): | |
with cd(env.project_root): | |
run('git pull') | |
collect_static() | |
def reload(): | |
sudo('supervisorctl restart visalaid', shell=False) | |
def deploy(): | |
push() | |
pull() | |
reload() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment