Use HAProxy with Docker
1. Create Dockerfile for HAProxy Build with Docker
2. Docker build using Dockerfile created
3. After you build Dockerfile, you can find docker images that is my-haproxy
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
my-haproxy latest 98f53e224010 5 hours ago 134.9 MB
4. To create HAProxy you should make haproxy.cfg that is configure file for haproxy.
For test I already created two nodes
haproxy.cfg are contained health check
- Set haproxy monitoring
- You can connect [host_ip]:1936/stats and see haproxy web ui
- auth - account ID / account PW
- Bind 80 port.
- balance mode is roundrobin.
- health check for web1, web2.
'Docker' 카테고리의 다른 글
|docker file copy from container to host (0)||2017.04.03|
|Nginx on Docker (0)||2017.03.30|
|socket.io load balancing with HAProxy on Docker (0)||2017.03.28|
|HAProxy with Docker (0)||2017.03.24|
|docker upgrade (error : The engine version is lesser than the minimum required by compose) (0)||2016.07.18|
|docker-compose version upgrade (0)||2016.07.18|