Добавить пароли, вход по Basic и Bearer-сессии в Redis

This commit is contained in:
2026-10-08 18:54:34 +03:00
parent 551c763d5e
commit db9edd8fd2
6 changed files with 451 additions and 0 deletions
+11
View File
@@ -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)