I have a flask app that I want to run using uwsgi
. I am also managing the uwsgi
with supervisor
.
here is the my supervisor.conf file
[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
Here is the 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
The problem is that when supervisor starts I see in /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
I understand that this is Flask's development server's warning message. How do I use production WSGI server Instead?