Добавить X-Instance-Id, общую идемпотентность и строгий разбор тела запроса
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Проверка для Docker HEALTHCHECK: код 0, если /health/ready отвечает 200."""
|
||||
import os
|
||||
import sys
|
||||
import urllib.request
|
||||
|
||||
port = os.getenv("APP_PORT", "8080")
|
||||
try:
|
||||
with urllib.request.urlopen(f"http://127.0.0.1:{port}/health/ready", timeout=4) as response:
|
||||
sys.exit(0 if response.status == 200 else 1)
|
||||
except Exception:
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user