Explore Flask

13.3. Summary

  • Three good choices for hosting Flask apps are AWS EC2, Heroku and Digital Ocean.
  • The basic deployment stack for a Flask application consists of the app, an application runner like Gunicorn and a reverse proxy like Nginx.
  • Gunicorn should sit behind Nginx and listen on (internal requests) not (external requests).
  • Use Werkzeug's ProxyFix to handle the appropriate proxy headers in your Flask application.