0

I have a docker-compose.yml file which runs a couple of Apache web applications. I have a HAProxy acting as a reverse proxy for the web apps also running inside the container environment. I've exposed the HAProxy port with the directive

ports:
  - 80:80

The web apps, proxy and networking are exactly similar to the setup as described in http://www.inanzzz.com/index.php/post/w14j/creating-a-single-haproxy-and-two-apache-containers-with-docker-compose.

I'm running this in a Google Compute Engine Virtual Machine (CentOS 7). When I run docker-compose up, I'm able to reach the HAProxy at my localhost.

curl http://localhost:80/<url-path>

This works fine.

What I would like to do now is have this HAProxy accessible from a public IP. For example, I'd like to

curl http://<public-ip>:80/<url-path>

and reach the HAProxy.

Currently, the response I'm getting is just a timeout. I'm stuck trying to debug my infrastructure right now. Any help will be much appreciated.

0 Answers0