Skip to content

Commit ba9f34a

Browse files
authored
Merge pull request #72 from josephcsible/usr1stop
Stop with SIGUSR1
2 parents 50a14f8 + 5803ee6 commit ba9f34a

File tree

10 files changed

+60
-0
lines changed

10 files changed

+60
-0
lines changed

1.5/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ RUN set -x \
5050
| xargs -r apt-mark manual \
5151
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5252

53+
# https://www.haproxy.org/download/1.8/doc/management.txt
54+
# "4. Stopping and restarting HAProxy"
55+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
56+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
57+
STOPSIGNAL SIGUSR1
58+
5359
COPY docker-entrypoint.sh /
5460
ENTRYPOINT ["/docker-entrypoint.sh"]
5561
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.5/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ RUN set -x \
5050
&& apk add --virtual .haproxy-rundeps $runDeps \
5151
&& apk del .build-deps
5252

53+
# https://www.haproxy.org/download/1.8/doc/management.txt
54+
# "4. Stopping and restarting HAProxy"
55+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
56+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
57+
STOPSIGNAL SIGUSR1
58+
5359
COPY docker-entrypoint.sh /
5460
ENTRYPOINT ["/docker-entrypoint.sh"]
5561
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.6/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
| xargs -r apt-mark manual \
5353
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.6/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
&& apk add --virtual .haproxy-rundeps $runDeps \
5353
&& apk del .build-deps
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.7/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
| xargs -r apt-mark manual \
5353
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.7/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
&& apk add --virtual .haproxy-rundeps $runDeps \
5353
&& apk del .build-deps
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.8/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
| xargs -r apt-mark manual \
5353
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1.8/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
&& apk add --virtual .haproxy-rundeps $runDeps \
5353
&& apk del .build-deps
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

Dockerfile-alpine.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
&& apk add --virtual .haproxy-rundeps $runDeps \
5353
&& apk del .build-deps
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

Dockerfile-debian.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ RUN set -x \
5252
| xargs -r apt-mark manual \
5353
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5454

55+
# https://www.haproxy.org/download/1.8/doc/management.txt
56+
# "4. Stopping and restarting HAProxy"
57+
# "when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed"
58+
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
59+
STOPSIGNAL SIGUSR1
60+
5561
COPY docker-entrypoint.sh /
5662
ENTRYPOINT ["/docker-entrypoint.sh"]
5763
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

0 commit comments

Comments
 (0)