Implementing HTTPS locally with docker-compose
When it comes to implementing HTTPS, most of the work is going to be achieved through NGINX. Although we have worked a little with NGINX, the NGINX configuration is a powerful tool. You can implement conditional logic, pull variables and data from the request and act on them, redirect traffic, and much more. In this chapter, we are going to do enough to implement HTTPS, but it is advised if you have time to read up on the fundamentals of NGINX configurations; reading material is provided in the Further reading section. For our deployment/nginx_config.yml
file, we need to have the following layout:
worker_processes auto; error_log /var/log/nginx/error.log warn; events { worker_connections 512; } http { server { . . . } server { &...