flask 项目自动化部署 简单解决方案
------tongbu.sh--------
cd /www/wwwroot/web/cms.xiaoguan.net/ && git pull
/usr/bin/sh /www/wwwroot/web/cms.xiaoguan.net/sh/restart_flask.sh
ansible web -m command -a '/usr/bin/sh /www/wwwroot/web/cms.xiaoguan.net/sh/restart_flask.sh'
----restart_flask.sh---------
killall flask
rm -f /www/wwwroot/web/cms.xiaoguan.net/.env && cp -f /www/wwwroot/web/cms.xiaoguan.net/_user.env /www/wwwroot/web/cms.xiaoguan.net/.env
rm -f /www/wwwroot/web/cms.xiaoguan.net/.flaskenv && cp -f /www/wwwroot/web/cms.xiaoguan.net/_user.flaskenv /www/wwwroot/web/cms.xiaoguan.net/.flaskenv
cd /www/wwwroot/web/cms.xiaoguan.net && nohup flask run 2>>/www/wwwroot/web/logs/cms_xiaoguan_net.log&