diff --git a/dockerfiles/load-balancer/haproxy/Dockerfile b/dockerfiles/load-balancer/haproxy/Dockerfile deleted file mode 100644 index 824ad007fa6913b46cc892a88462534de5df22ef..0000000000000000000000000000000000000000 --- a/dockerfiles/load-balancer/haproxy/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM debian:jessie - -ENV DEBIAN_FRONTEND noninteractive - -# Install Haproxy. -RUN \ - apt-get update && \ - apt-get install -y \ - haproxy \ - rsyslog && \ - rm -rf /var/lib/apt/lists/* - -ADD run.sh /run.sh - -CMD ["/run.sh"] -EXPOSE 80 -EXPOSE 443 - diff --git a/dockerfiles/load-balancer/haproxy/README.md b/dockerfiles/load-balancer/haproxy/README.md deleted file mode 100644 index 801db3c2bd7ac0d9867a19b8f10ffc359521b695..0000000000000000000000000000000000000000 --- a/dockerfiles/load-balancer/haproxy/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# HAproxy - -The smallest HAproxy docker image in town ;) - -## Run - -```bash -docker run\ - -v /haproxy-config:/etc/haproxy\ - -p 80:80\ - -p 443:443\ - indiepaas/haproxy -``` - -Have a look to [indiepaas/confd](https://registry.hub.docker.com/u/indiepaas/confd/) to have automatic configuration of HAproxy backed by `etcd` or `consul`. diff --git a/dockerfiles/load-balancer/haproxy/run.sh b/dockerfiles/load-balancer/haproxy/run.sh deleted file mode 100755 index e824876e2c7cbee36a496da04677df1fbfb39b43..0000000000000000000000000000000000000000 --- a/dockerfiles/load-balancer/haproxy/run.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e - -function cleanup { - /etc/init.d/haproxy stop - /etc/init.d/rsyslog stop - exit 0 -} - -# start haproxy in bg and tail logs out to stdout -/usr/sbin/service rsyslog start -/etc/init.d/haproxy start -tail -f /var/log/syslog & -tail -f /var/log/haproxy.log & - -trap cleanup SIGTERM SIGINT - -while true; do # Iterate to keep job running. - sleep 1 # Don't sleep too long as signals will not be handled during sleep. -done - diff --git a/unit-files/haproxy.service b/unit-files/haproxy.service index 7bab6f139c9316f13f0b49f26fdde25ccc0eeb76..7bc1a3b4d05483369c406ea61d6e9fb8f94e6c67 100644 --- a/unit-files/haproxy.service +++ b/unit-files/haproxy.service @@ -19,7 +19,7 @@ ExecStart=/usr/bin/docker run \ -v /data/runtime/haproxy:/etc/haproxy \ -p 80:80 \ -p 443:443 \ - indiepaas/haproxy + haproxy haproxy -f /etc/haproxy/haproxy.cfg ExecReload=/usr/bin/docker restart %p ExecStop=/usr/bin/docker stop %p