Fix healthcheck to netcat to actual IP

Since localhost usualy resolves in to 127.0.0.1/::1 in case we run custom ip it will fail, so lets fix that.
This commit is contained in:
Klemen Mihevc 2022-04-04 21:51:50 +02:00 committed by GitHub
parent 837236c777
commit 7979f40e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ WORKDIR /home/py-kms
EXPOSE ${PORT}/tcp
HEALTHCHECK --interval=5m --timeout=3s --start-period=10s --retries=4 CMD echo | nc -z localhost ${PORT} || exit 1
HEALTHCHECK --interval=5m --timeout=3s --start-period=10s --retries=4 CMD echo | nc -z ${IP%% *} ${PORT} || exit 1
ENTRYPOINT ["/usr/bin/python3", "-u","/usr/bin/entrypoint.py"]
CMD ["/usr/bin/start.py"]