From 29575690cb77b5325039b0958cbb753bf466d623 Mon Sep 17 00:00:00 2001 From: Dmytro Pashynskyi Date: Thu, 5 Sep 2024 20:45:40 +0300 Subject: [PATCH] feat: add Docker healthcheck --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1c8682f..c17e2f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,7 @@ EXPOSE 5000 USER appuser ENTRYPOINT ["/docker_entrypoint.sh"] +HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=6 \ + CMD wget --no-verbose --tries=1 --spider http://localhost:5000/health || exit 1 + CMD uvicorn aidial_adapter_dial.app:app --host 0.0.0.0 --port 5000 --timeout-keep-alive ${TIMEOUT_KEEP_ALIVE:-5}