mirror of
https://github.com/SystemRage/py-kms.git
synced 2025-08-21 13:12:53 +08: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:
@@ -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"]
|
||||
|
Reference in New Issue
Block a user