How to NGINX Reverse Proxy with Docker Compose

While developing a web application, a common method of calling the application from a local machine is through http://localhost:x ports, which essentially means that we are required to expose several ports to access different modules of the application. In the article below, we will go through the method of using Reverse Proxy to call an application and the benefits of using it.

Why Do We Need Reverse Proxy?

The most obvious reason for using Reverse Proxy is to avoid changing ports every time you try to access different modules of the application through the same URL. Through Reverse Proxy we can reach frontend, backend, or other services without changing port through a single domain. Another important reason for using Reverse Proxy is to mask services behind a proxy and avoid dealing with CORS issues.

Introduction to the Hexagonal Architecture in Java

To start with, the hexagonal architecture is nothing but a design pattern. Every design pattern solves some problem, right? That is why it originally came into existence. So, what more does hexagonal architecture bring to the table?

Well, a very common problem is encountered whenever an application tries to interact due to huge dependencies over factors such as UI, the testing environment, DBs, external APIs, and so on.