fabfile.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Mastering-Flask 作者: PacktPublishing 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号