From c62a4cca482517cac833693e4f48616cdce8d752 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Tue, 17 Sep 2024 09:35:32 +0100 Subject: [PATCH] Dockerfile: Add health check --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index bf69e9a..71a932d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,3 +21,8 @@ ENV LAST_UPDATE=$last_update ENTRYPOINT [ "python3" ] CMD [ "application.py" ] + +# TODO: in docker 25 and later, we should use --start-interval and +# --start-period to perform more frequent checks on startup to speed +# up tests +HEALTHCHECK --interval=10s CMD curl --fail http://localhost:5000 || exit 1