Skip to content

Commit 56d39ed

Browse files
authored
some adjustments after testing in production (#21)
Signed-off-by: Alexander Piskun <[email protected]>
1 parent efcc84e commit 56d39ed

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

.github/workflows/renovate.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ USER root
55
ENV HAPROXY_PORT 2375
66
ENV BIND_ADDRESS *
77
ENV EX_APPS_NET "localhost"
8-
ENV EX_APPS_COUNT 50
8+
ENV EX_APPS_COUNT 30
99
ENV TIMEOUT_CONNECT "10s"
1010
ENV TIMEOUT_CLIENT "30s"
11-
ENV TIMEOUT_SERVER "30s"
11+
ENV TIMEOUT_SERVER "1800s"
1212

1313
RUN set -ex; \
1414
apk add --no-cache \
@@ -18,7 +18,8 @@ RUN set -ex; \
1818
curl \
1919
openssl \
2020
bind-tools \
21-
nano; \
21+
nano \
22+
vim; \
2223
chmod -R 777 /tmp
2324

2425
COPY --chmod=775 *.sh /
@@ -28,3 +29,4 @@ COPY --chmod=664 haproxy_ex_apps.cfg /haproxy_ex_apps.cfg
2829
WORKDIR /
2930
ENTRYPOINT ["/bin/bash", "start.sh"]
3031
HEALTHCHECK --interval=10s --timeout=10s --retries=9 CMD /healthcheck.sh
32+
LABEL com.centurylinklabs.watchtower.enable="false"

haproxy.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ frontend docker_engine
4141
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping } METH_GET
4242
# container inspect: GET containers/%s/json
4343
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/json } METH_GET
44+
# container inspect: GET containers/%s/logs
45+
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/logs } METH_GET
4446
# container start/stop: POST containers/%s/start containers/%s/stop
4547
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/((start)|(stop)) } METH_POST
4648
# container rm: DELETE containers/%s

start.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ else
2626
cat /haproxy.cfg
2727
haproxy -f /haproxy.cfg -db
2828
fi
29+
echo "HaProxy quit unexpectedly"
30+
exit 1

0 commit comments

Comments
 (0)