Add reload support

Fix #5
This commit is contained in:
Kristian Klausen authored and Kristian Klausen committed 2016-03-16 17:56:21 +01:00
1 parent 7998146d9f
commit f0d2bb10b3
6 files changed
+45

No files matched your search

+2
View File
@@ -27,4 +27,6 @@ RUN buildDeps='curl gcc libc6-dev libpcre3-dev libssl-dev make' \
&& rm -rf /usr/src/haproxy \
&& apt-get purge -y --auto-remove $buildDeps
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
set -eo pipefail
# first arg is `-f` or `--some-option`
if [ "${1:0:1}" = '-' ]; then
set -- haproxy "$@"
fi
exec "$@"
+2
View File
@@ -27,4 +27,6 @@ RUN buildDeps='curl gcc libc6-dev libpcre3-dev libssl-dev make' \
&& rm -rf /usr/src/haproxy \
&& apt-get purge -y --auto-remove $buildDeps
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -eo pipefail
# first arg is `-f` or `--some-option`
if [ "${1:0:1}" = '-' ]; then
set -- haproxy "$@"
fi
if [ "$1" = 'haproxy' ]; then
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
shift # "haproxy"
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
fi
exec "$@"
+2
View File
@@ -27,4 +27,6 @@ RUN buildDeps='curl gcc libc6-dev libpcre3-dev libssl-dev make' \
&& rm -rf /usr/src/haproxy \
&& apt-get purge -y --auto-remove $buildDeps
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -eo pipefail
# first arg is `-f` or `--some-option`
if [ "${1:0:1}" = '-' ]; then
set -- haproxy "$@"
fi
if [ "$1" = 'haproxy' ]; then
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
shift # "haproxy"
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
fi
exec "$@"