我有一个要使用 运行的 Flask 应用程序uwsgi
。我还使用 进行管理uwsgi
。supervisor
这是我的 Supervisor.conf 文件
[program:myapp]
command=/opt/python_envs/apps/bin/uwsgi --ini /opt/apps/myapp_wsgi.ini
stdout_logfile=/var/log/supervisor/program_myapp.log
stderr_logfile=/var/log/supervisor/program_myapp.error
numprocs=1
autostart=true
autorestart=true
startretries=5
user=root
environment=PATH='/opt/python_envs/apps/bin'
directory=/opt/apps
这是 myapp_wsgi.ini
[uwsgi]
chdir = /opt/apps/myapp
http = :8880
module = myapp:app
enable-threads = true
master = true
processes = 2
uid=root
gid=www-data
socket = myapp.sock
chmod-socket = 660
vacuum = true
need-app = true
die-on-term = true
logger = file:/opt/apps/myapp/logs/uwsgi.log
问题是,当主管启动时,我看到/var/log/supervisor/program_myapp.log
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
我理解这是 Flask 开发服务器的警告信息。我该如何使用生产 WSGI 服务器?