Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Latest commit

 

History

History
30 lines (18 loc) · 1.14 KB

README.md

File metadata and controls

30 lines (18 loc) · 1.14 KB

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