mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-23 03:27:15 -04:00
Fixed healthcheck for classic (non Kubernetes) Docker (broken with default-ipv6 "::" listen ip) #89
Added multi-ip healthcheck support Cleanup of logging inside container-scripts Removed "nc" from containers
This commit is contained in:
parent
92ec80b698
commit
474c5feb6d
5 changed files with 79 additions and 47 deletions
|
@ -22,7 +22,6 @@ bash \
|
|||
ca-certificates \
|
||||
shadow \
|
||||
tzdata \
|
||||
netcat-openbsd \
|
||||
&& pip3 install --no-cache-dir -r /home/py-kms/requirements.txt \
|
||||
&& adduser -S py-kms -G users -s /bin/bash \
|
||||
&& chown py-kms:users /home/py-kms \
|
||||
|
@ -31,14 +30,14 @@ bash \
|
|||
|
||||
COPY ./py-kms /home/py-kms
|
||||
COPY docker/entrypoint.py /usr/bin/entrypoint.py
|
||||
COPY docker/healthcheck.py /usr/bin/healthcheck.py
|
||||
COPY docker/start.py /usr/bin/start.py
|
||||
|
||||
RUN chmod 755 /usr/bin/entrypoint.py
|
||||
RUN chmod 555 /usr/bin/entrypoint.py /usr/bin/healthcheck.py /usr/bin/start.py
|
||||
|
||||
WORKDIR /home/py-kms
|
||||
|
||||
EXPOSE ${PORT}/tcp
|
||||
|
||||
HEALTHCHECK --interval=5m --timeout=3s --start-period=10s --retries=4 CMD echo | nc -z ${IP%% *} ${PORT} || exit 1
|
||||
HEALTHCHECK --interval=5m --timeout=10s --start-period=10s --retries=3 CMD /usr/bin/python3 /usr/bin/healthcheck.py
|
||||
|
||||
ENTRYPOINT ["/usr/bin/python3", "-u", "/usr/bin/entrypoint.py"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue