Flask in Production with Nginx - Microservices
Explore how to deploy Flask applications in a production environment using Docker with Nginx as a proxy server and Gunicorn as the WSGI server. Understand microservice architecture, secure communication with self-signed certificates, load distribution with replicas, and resource management for robust app performance.
We'll cover the following...
Getting exposure to production systems before starting on any project will definitely give you a positive feeling and confidence. This lesson is all about how the app looks like in production.
There are n number of ways an app can be deployed in production, but the idea behind is the same: using an architecture which can survive the load.
Type
git logand checkout the commit 327b245bbd4392d3dee40a24457c3ed44a1ef5b9 ( Flask in Production with Nginx - Microservices) for code related to this lesson.
Production code explanation
You will see a lot of changes in this version of the code. Let’s list them one by one.
Docker level
- New Nginx service
- Read-only mounting of the file