Public | Automated Build

Last pushed: 7 days ago
Short Description
Docker images for haproxy
Full Description

HAProxy

These are docker images for HAProxy running on an
Alpine Linux container.

Usage

docker run -p 80:80 -p 443:443 -p 9000:9000 -d --name haproxy webhippie/haproxy:latest

Versions

Available environment variables

ENV DISCOVERY_TYPE etcd
ENV DISCOVERY_HOST 127.0.0.1
ENV DISCOVERY_PORT 4001
ENV DISCOVERY_INTERVAL 30
ENV DISCOVERY_PREFIX /
ENV DISCOVERY_OPTS # Optional, any allowed confd param
ENV DISCOVERY_CLIENT_KEY # Optional, as string or filename
ENV DISCOVERY_CLIENT_CERT # Optional, as string or filename
ENV DISCOVERY_CLIENT_CA # Optional, as string or filename

ENV HAPROXY_USERNAME webhippie
ENV HAPROXY_PASSWORD webhippie
ENV HAPROXY_CERT # Optional, as string or filename
ENV HAPROXY_OPTS
ENV HAPROXY_TOTAL_MAXIMUM
ENV HAPROXY_PROXY_MAXIMUM
ENV HAPROXY_MEMORY_LIMIT
ENV HAPROXY_PEER_NAME

Inherited environment variables

ENV LOGSTASH_ENABLED false
ENV LOGSTASH_HOST logstash
ENV LOGSTASH_PORT 5043
ENV LOGSTASH_CA /etc/ssl/logstash/certs/ca.pem # As string or filename
ENV LOGSTASH_CERT /etc/ssl/logstash/certs/cert.pem # As string or filename
ENV LOGSTASH_KEY /etc/ssl/logstash/private/cert.pem # As string or filename
ENV LOGSTASH_TIMEOUT 15
ENV LOGSTASH_OPTS

Configure with etcd

If you export DISCOVERY_TYPE with the value etcd you can use etcd
for configuration:

etcdctl set /app/exampleapp 'example.com'
etcdctl set /upstream/exampleapp/server1 '127.0.0.1:3000'
etcdctl set /upstream/exampleapp/server2 '127.0.0.1:4000'

Configure with consul

If you export DISCOVERY_TYPE with the value consul you can use
consul for configuration:

curl -X PUT -d 'example.com' http://localhost:8500/v1/kv/app/exampleapp
curl -X PUT -d '127.0.0.1:3000' http://localhost:8500/v1/kv/upstream/exampleapp/server1
curl -X PUT -d '127.0.0.1:4000' http://localhost:8500/v1/kv/upstream/exampleapp/server2

Configure with environment

If you export DISCOVERY_TYPE with the value env you can use
environment for configuration:

export APP_EXAMPLEAPP=example.com
export UPSTREAM_EXAMPLEAPP_SERVER1=127.0.0.1:3000
export UPSTREAM_EXAMPLEAPP_SERVER2=127.0.0.1:4000

Contributing

Fork -> Patch -> Push -> Pull Request

Authors

License

MIT

Copyright

Copyright (c) 2015 Thomas Boerger <http://www.webhippie.de>
Docker Pull Command
Owner
webhippie
Source Repository