This container listens on the Docker socket and configures an HAProxy based on labels attached to the containers.
Supports HTTP(S) and TCP
Run like so
docker run -v /var/run/docker.sock:/var/run/docker.sock --net=host fischerman/millennium-falcon
Start a backend container like so:
docker run -p 80 -l "de.bfischerman.proxy-url=example.com" -l "de.bfischerman.proxy-port=80" nginx
HTTP_PORT
: The HTTP port HAProxy binds to. Set todisable
to not use HTTP backend. Default is80
.HTTPS_PORT
: The HTTPS port HAProxy binds to. Set todisable
to not use HTTPS backend. Default is443
.STATS_USER
: The stats username. Default isadmin
.STATS_PASS
: The password for the stats page. If not set, stats are disabled.
/certs/
: Certificate with the namecombined.pem
is used for HTTPS backend. If not mounted, a self-gen cert is used.
de.bfischerman.proxy-mode
:tcp
orhttp
de.bfischerman.proxy-source
: The port HAProxy binds tode.bfischerman.proxy-target
: The private port of the container. It will be translated to the public port.
de.bfischerman.proxy-url
: Domain + Path, e.g.example.com/service
. Used by HAProxy to generateuse_backend
-statements. The domain as well as the path must match. Required. Only domain OR path is required.de.bfischerman.proxy-protocol
: Can behttp
,https
orboth
. Default ishttp
. Optionalde.bfischerman.proxy-redirect-http
: Redirect http traffic to https. Can betrue
orfalse
. Default isfalse
. Optional.de.bfischerman.proxy-port
: The private port to redirect tode.bfischerman.proxy-options
: TBAde.bfischerman.proxy-letsencrypt
: TBA