-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No configuration generated when using docker discovery #54
Comments
Would you mind sharing the command you are using to spin up the containers? |
docker run --name haproxy --detach --network host -v /var/run/docker.sock:/var/run/docker.sock:ro -e EASYHAPROXY_DISCOVER=docker byjg/easy-haproxy:4.4.0
docker run --name grafana --detach --network host --label easyhaproxy.grafana.host=grafana.zasdaym.my.id --label easyhaproxy.localport=3000 grafana/grafana-oss:10.2.3 |
Hello, the Easy HAProxy will not work with the network host. Try change to:
You do not need map the port for the Grafana container since the access will be done by the EASYPROXY on the address |
May I know why it doesn't work on host network? I think it's good to mention it in the documentation too. |
EasyHAProxy requires network inspection from within the Docker container where it's deployed. When a container resides in a different network, it must be added to the EasyHAProxy network (source: https://github.com/byjg/docker-easy-haproxy/blob/master/src/processor/__init__.py#L116-L143). In this specific scenario, the container fails to detect other containers due to its inability to recognize the host network. This is the primary technical limitation. Additionally, deploying EasyHAProxy in front of containers eliminates the need for exposing them individually, as all traffic can now be efficiently redirected through HAProxy. |
Hi, I'm trying to use the standalone docker discovery but can't make it work.
The text was updated successfully, but these errors were encountered: