Bare minimum HAProxy image that does TCP roundrobin on backends supplied by environment variables.
509
Bare minimum HAProxy docker image that does TCP roundrobin on backends supplied by environment variable.
Install docker
docker run -d --name proxy -p 80:80 -e PORT=80 -e BACKENDS=foo.com,bar.com viranch/haproxy-env
Replace following things as desired:
-p 80:80 -e PORT=80 with desired port numbers.-e BACKENDS=foo.com,bar.com with actual app server backends.This repository includes a sample docker-compose.yml, copy the service block into your docker-compose.yml if you're using docker-compose.
This is the template as explained in jwilder/dockerize for configuring HAProxy. Customize it to your needs and if you think it will help others, send a pull request :)
Content type
Image
Digest
sha256:2ee6437c5…
Size
46.1 MB
Last updated
about 11 years ago
docker pull viranch/haproxy-env