Photo by Erik Mclean on UnsplashWhy using HTTPS in development?
The need to use HTTPS in development may seem anecdotal, however, several cases meet this need:
- To perform certain tests locally (such as lighthouse audits)
- Avoid CORS errors thanks to reverse proxies
- To respond to point number 10 of the 12 factor app which suggests that the production and dev environments should be as similar as possible.
How to implement it using docker-compose?
To explain how to implement an HTTPS environment in dev, I will use a small project that will serve as an example throughout this article.
This project is based on 2 microservices:
- An “API” written in Flask / Python
- A whoami container (it’s…