Add docker healthcheck (#1492)

This commit is contained in:
Klarstein 2021-01-27 07:16:59 +01:00 committed by Jesse Hills
parent ea019a057b
commit 95bef53d37
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -15,6 +15,10 @@ ENV USERNAME="" PASSWORD=""
# Expose the dashboard to Docker
EXPOSE 6052
# Run healthcheck (heartbeat)
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl --fail http://localhost:6052 || exit 1
# The directory the user should mount their configuration files to
WORKDIR /config
# Set entrypoint to esphome so that the user doesn't have to type 'esphome'