juanako / docker-haproxy

Apache Virtual Hosts like behaviour for Docker - Deprecated in favor of jwilder/nginx-proxy

Home Page:https://github.com/jwilder/nginx-proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker HAProxy

Ease development with Docker by routing requests to your development domains to the right container, similarly to virtual hosts in Apache and NGINX.

Usage

First time set-up

  1. Create a docker network named proxy: docker network create proxy
  2. Run docker-haproxy with docker-compose up

Configure your containers/services

  1. Add VIRTUAL_HOST environment variable to your container/service with your desired domain name (e.g. test.dev)
  2. Add your domain name to your hosts file and point it to 127.0.0.1 or use dnsmasq route your whole TLD (e.g. .dev) to 127.0.0.1.
  3. Start your container/service and browse to your domain, voilĂ .

Note: docker-haproxy only needs to be started once! After that it will automatically start whenever your docker daemon is started, even after a reboot. To stop docker-haproxy simply run docker-compose stop.

Links

Authors

License

BSD-2-Clause license, see LICENSE

About

Apache Virtual Hosts like behaviour for Docker - Deprecated in favor of jwilder/nginx-proxy

https://github.com/jwilder/nginx-proxy

License:BSD 2-Clause "Simplified" License