Language/python
python fabric 설치
세모데
2017. 6. 6. 00:00
1. fabic install
pip install fabric
2. 설정
from fabric.api import sudo, cd, prefix, run, settings
def deploy_app():
"Test..."
dir = '/tmp/env'
with cd(dir):
with prefix("source %s/bin/activate" % dir):
with cd('app')
run('git pull')
run('python setup.py install')
sudo('bin/supervisorctl restart all')
def deploy_app_to_server():
"Test..."
deploy_app()