Comments (5)
Would you mind sharing the command you are using to spin up the containers?
from docker-easy-haproxy.
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
from docker-easy-haproxy.
Hello, the Easy HAProxy will not work with the network host.
Try change to:
docker run --name haproxy --detach -p 80:80 -p 443:443 -p 1936:1936 -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 --label easyhaproxy.grafana.host=grafana.zasdaym.my.id --label easyhaproxy.localport=3000 grafana/grafana-oss:10.2.3
You do not need map the port for the Grafana container since the access will be done by the EASYPROXY on the address http://grafana.zasdaym.my.id
from docker-easy-haproxy.
May I know why it doesn't work on host network? I think it's good to mention it in the documentation too.
from docker-easy-haproxy.
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.
from docker-easy-haproxy.
Related Issues (20)
- Add ability to customize the label prefix HOT 7
- Which networks are scanned? HOT 3
- Add letsencrypt integration HOT 4
- Make the definitions part of the label the second part instead of the end HOT 2
- Add ability to disable the stats port HOT 10
- How do we handle multiple domains? HOT 2
- Add a way to configure log-level HOT 3
- Add ability to override the letsencrypt server HOT 3
- Use container ip instead of container name when using the default bridge network HOT 5
- Using labels to configure haproxy running on a different host HOT 6
- Docker Swarm error: Service cannot be explicitly attached to the ingress network "ingress" HOT 9
- Enable HTTP/2 over HTTPS HOT 8
- Certbot Continues Requests Despite Hitting Let's Encrypt Certificate Rate Limit HOT 21
- Support Custom Configuration Files + Custom LoadBalance
- Crash when a container with `network_mode: host` is running HOT 3
- Certbot not working: connection refused HOT 5
- HTTP/3 HOT 1
- [FEATURE REQUEST] Custom defaults, frontend and backend configuration HOT 5
- Create Plugins for EasyHAProxy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-easy-haproxy.