Hi, my system is described as following picture:
I use Drone runner docker to build and then run a Java process inside that container, which listens on port 8080. This port is blocked from outside by the host iptables and I want to use nginx to route HTTP requests to myapp.com to 8080 of the above container.
Question 1:
Is this approach correct?
Question 2:
If it is ok with above solution, how can I configure nginx to pass requests? because the container name is randomly generated by Drone, and its IP address is also dynamic.
{
// ...
server_name myapp.com;
location / {
proxy_pass WHERE/WHAT TO PASS HERE :8080;
}
}
Thank you!