From 222ae06b875642263316823c9801301c6d7cd007 Mon Sep 17 00:00:00 2001 From: Mikhail Lobanov Date: Thu, 15 Oct 2026 00:21:49 +0300 Subject: [PATCH] Add Docker healthcheck --- compose.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compose.yaml b/compose.yaml index 8b95594..166b9e1 100644 --- a/compose.yaml +++ b/compose.yaml @@ -15,3 +15,14 @@ services: mem_limit: 256m cpus: 0.5 + + healthcheck: + test: + - CMD + - python + - -c + - "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)" + interval: 30s + timeout: 3s + retries: 3 + start_period: 5s