Балансировка, реплики, идемпотентность

This commit is contained in:
Queenfish
2026-10-16 01:07:34 +03:00
parent 0ab3a341aa
commit cb11011869
59 changed files with 3916 additions and 27 deletions
+21
View File
@@ -0,0 +1,21 @@
import os
import secrets
class Config:
DATABASE_URL: str = os.getenv(
"DATABASE_URL",
"postgresql://messenger:messenger@localhost:5432/messenger",
)
SESSION_TTL_SECONDS: int = int(os.getenv("SESSION_TTL_SECONDS", "3600"))
APP_HOST: str = os.getenv("APP_HOST", "0.0.0.0")
APP_PORT: int = int(os.getenv("APP_PORT", "8080"))
SESSION_STORE: str = os.getenv("SESSION_STORE", "postgres")
CACHE_URL: str = os.getenv(
"CACHE_URL",
"redis://valkey:6379/0",
)
INSTANCE_ID: str = os.getenv("INSTANCE_ID") or secrets.token_hex(6)
config = Config()