Suppose I want to create a Web app which consists of three different dockerized parts:
Eg. When a user visits example.com the static frontend is served, they click on a button which triggers a call to the API, the API in turn calls and waits for the result of a Python Script.
Would I set up RESTful Endpoints for 2. and 3.? If the API should be publicly available would I create another NGINX instance, so it would be NGINX and Go inside a single container? How would I „collect“ the result of the Python script for the API, with another NGINX instance inside the Python container? Wouldn't that violate the principles of Docker and drastically reduce maintainability as I‘d have to maintain every NGINX instance?
I see two ways to handle this: