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

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

License

Notifications You must be signed in to change notification settings

Cloudstek/docker-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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