aschmidt75 / haproxy-docker-config

Configuring haproxy to automatically redirect to docker instances
MIT License
54 stars 4 forks source link

question: is this to run outside or inside the haproxy docker container? #2

Open drnic opened 11 years ago

drnic commented 11 years ago

From a quick read of the readme & some source, it looks like you need to run these scripts inside the docker haproxy container. Correct?

If so, can you think of ways where configuration of the container can be scripted from outside of the container? Manually finding & going inside containers and running commands doesn't seem very modern :)

aschmidt75 commented 11 years ago

Hi there, well you actually could - i intended to run it outside of containers. My picture of this is having a vm with a number of containers, and a balancing solution (like haproxy) at the vm level, to proxy among the containers. Of course the haproxy can itself run in a container, but then it would probably not be able to query the docker api (unless you expose the api on the internal docker network). Or you expose the filesystem where haproxy.cfg is to the vm level, and modify it there.