by fideloper · 12y ago · 0 comments
Do you need a load balancer which can send requests upstream based on host name? (Nginx load balancing perhaps?) is that not a good use case for docker?
You can try nginx-proxy that wraps up the approach in a docker container. See https://registry.hub.docker.com/u/jwilder/nginx-proxy/.
Run that on your host and start your other containers on the host with VIRTUAL_HOST env variables and it will set up virtual host mappings via nginx automatically.
Eg
backend beChalet
option httpchk GET /
server chalet ${CHALET_PORT_80_TCP_ADDR}:${CHALET_PORT_80_TCP_PORT} maxconn 200 check
https://docs.docker.com/userguide/dockerlinks/#container-lin... has more details