def deploy():
test()
with cd('/home/deploy/webapp'):
run("git pull")
run("pip install -r requirements.txt")
sudo("cp supervisord.conf /etc/supervisor/conf.d/webapp.conf")
sudo("cp nginx.conf /etc/nginx/sites-available/your_domain")
sudo("ln -sf /etc/nginx/sites-available/your_domain "
"/etc/nginx/sites-enabled/your_domain")
sudo("cp apache.conf /etc/apache2/sites-available/your_domain")
sudo("ln -sf /etc/apache2/sites-available/your_domain "
"/etc/apache2/sites-enabled/your_domain")
sudo("service nginx restart")
sudo("service apache2 restart")
评论列表
文章目录