Deploying Flask applications on LEMP

4.92K viewsLEMPConfiguration Flask Intermediate Python uWSGI

How do I deploy my Flask application with a LEMP stack?


A common way to deploy Python applications using Nginx is with uWSGI. You would start the application with the necessary configuration, and then just pass Nginx requests to the uWSGI.

location @myapp {
   include uwsgi_params;
   uwsgi_pass unix:/tmp/myapp.sock;

Nginx and uWSGI configuration for Flask app deployment