HAProxy load-balancer dynamically configured based on rancher-metadata
10K+
This image starts an ha-proxy that reads rancher-metadata so it autoconfigures a default load balancer based on labels on other stacks.
The idea is forked from https://github.com/rawmind0/rancher-vamp-haproxy
nginx:
labels:
io.rancher_haproxy.exposed_port: 80
io.rancher_haproxy.server_names: example.net,www.example.net
io.rancher_haproxy.force_ssl.www.example.net: true
io.rancher_haproxy.ssl_verify_none: true
image: nginx
The above example will configure a reverse proxy:
A sample docker-compose.yml considering SSL support will be:
lb:
ports:
- 80:80/tcp
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
tty: true
image: mikroways/rancher-haproxy:1.1.1
stdin_open: true
ssl:
ports:
- 443:80
labels:
io.rancher.loadbalancer.ssl.ports: '443'
tty: true
image: rancher/load-balancer-service
links:
- lb:lb
stdin_open: true
You must configure a default rancher load balancer that only accept connections over SSL and redirects them to lb
Content type
Image
Digest
Size
16.7 MB
Last updated
over 8 years ago
docker pull mikroways/rancher-haproxy