安装Uwsgi:
务必用conda安装uwsgi,否则uwsgi依赖会安装不了会运行报错
conda install -c conda-forge uwsgi
conda install -c conda-forge libiconv
配置Uwsgi
[uwsgi]
socket = 127.0.0.1:3031
chdir = /Users/xxx/Test/Api_automation/api_automation
wsgi-file = projectname/wsgi.py
module = projectname.wsgi:application
master = true
processes = 20
threads = 5
vacuum=true
buffer-size = 65536
http=172.16.5.68:8888
max-requests = 200
stats = 127.0.0.1:9192
pidfile = uwsgi.pid
log-maxsize = 5000000
daemonize = logs/uwsgi.log
static-map=/static=static
运行Uwsgi
uwsgi --ini uwsgi.ini