Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some adjustments after testing in production #21

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/renovate.json

This file was deleted.

8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ USER root
ENV HAPROXY_PORT 2375
ENV BIND_ADDRESS *
ENV EX_APPS_NET "localhost"
ENV EX_APPS_COUNT 50
ENV EX_APPS_COUNT 30
ENV TIMEOUT_CONNECT "10s"
ENV TIMEOUT_CLIENT "30s"
ENV TIMEOUT_SERVER "30s"
ENV TIMEOUT_SERVER "1800s"

RUN set -ex; \
apk add --no-cache \
Expand All @@ -18,7 +18,8 @@ RUN set -ex; \
curl \
openssl \
bind-tools \
nano; \
nano \
vim; \
chmod -R 777 /tmp

COPY --chmod=775 *.sh /
Expand All @@ -28,3 +29,4 @@ COPY --chmod=664 haproxy_ex_apps.cfg /haproxy_ex_apps.cfg
WORKDIR /
ENTRYPOINT ["/bin/bash", "start.sh"]
HEALTHCHECK --interval=10s --timeout=10s --retries=9 CMD /healthcheck.sh
LABEL com.centurylinklabs.watchtower.enable="false"
2 changes: 2 additions & 0 deletions haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ frontend docker_engine
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping } METH_GET
# container inspect: GET containers/%s/json
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/json } METH_GET
# container inspect: GET containers/%s/logs
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/logs } METH_GET
# container start/stop: POST containers/%s/start containers/%s/stop
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/((start)|(stop)) } METH_POST
# container rm: DELETE containers/%s
Expand Down
2 changes: 2 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ else
cat /haproxy.cfg
haproxy -f /haproxy.cfg -db
fi
echo "HaProxy quit unexpectedly"
exit 1
Loading