Mounting a Docker image with Nginx
Until this chapter, we have been using the web server included in the Angular package to run our application locally. Although very competent, it focuses purely on the developer’s experience and does not have the performance and scalability capabilities required by the production environment.
For this purpose, we use production-grade web servers. One of the most popular is Nginx (pronounced Engine X).
To configure it, we need to create a file in the root of our project called nginx.default.conf
and add the following to it:
server { listen 80; sendfile on; default_type application/octet-stream; gzip on; gzip_http_version 1.1; gzip_disable "MSIE [1-6]\."; gzip_min_length 1100; gzip_vary on; gzip_proxied ...