Chapter 10. Deploying Your Application

In this chapter, we will learn how to deploy our Flask applications securely and in an automated, repeatable manner. We will see how to configure commonly used WSGI (Web Server Gateway Interface) capable servers such as Apache, Nginx, as well as the Python Webserver Gunicorn. Then we will see how to secure a part or the entire site using SSL, before finally wrapping up our application in a configuration management tool to automate our deployment.

In this chapter we shall learn the following topics:

  • Configuring commonly-used WSGI servers
  • Serving static files efficiently
  • Using SSL to secure your site
  • Automating deployment using Ansible

Running Flask with a WSGI server

It is important to note that Flask, by itself, ...

Get Learning Flask Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.