Skip to content

mkaag/docker-haproxy-confd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-haproxy-confd

Docker Hub

This repository contains the Dockerfile and the configuration files to build a Load Balancer based on Haproxy for Docker. The configuration is performed with confd.

Base Docker Image

Installation

docker build -t mkaag/haproxy-confd github.com/mkaag/docker-haproxy-confd

Usage

Basic usage

docker run -d -p 443:443 -p 80:80 -p 1936:1936 \
-v /opt/apps/ssl:/etc/ssl \
mkaag/haproxy-confd

PEM order

-----BEGIN MY CERTIFICATE-----
-----END MY CERTIFICATE-----
-----BEGIN INTERMEDIATE CERTIFICATE-----
-----END INTERMEDIATE CERTIFICATE-----
-----BEGIN INTERMEDIATE CERTIFICATE-----
-----END INTERMEDIATE CERTIFICATE-----
-----BEGIN ROOT CERTIFICATE-----
-----END ROOT CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----

etcd structure

etcdctl set /services/haproxy/frontend/https/cert /etc/ssl/private/server.pem
etcdctl set /services/haproxy/stats/white_list 192.168.0.0/24
etcdctl set /services/haproxy/backend/app1/hostname app1.domain.com
etcdctl set /services/haproxy/backend/app1/endpoints/1 192.168.0.11:8001
etcdctl set /services/haproxy/backend/app1/endpoints/2 192.168.0.11:8002
etcdctl set /services/haproxy/backend/app2/hostname app2.domain.com
etcdctl set /services/haproxy/backend/app2/endpoints/1 192.168.0.12:8001
etcdctl set /services/haproxy/backend/app2/endpoints/2 192.168.0.13:8002

CoreOS service files

Heads up to https://github.com/mkaag/coreos-services-tmpl for examples.

About

Docker image for Haproxy managed with confd

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages