Feature: серверная часть, ФИО и результаты теста в БД; правка ответа эскалация 80%

Made-with: Cursor
This commit is contained in:
2026-03-16 07:46:37 +00:00
parent 2de0d2cfbd
commit 05388b2ba6
14 changed files with 1971 additions and 48 deletions

27
backend/app/config.py Normal file
View File

@@ -0,0 +1,27 @@
"""Конфигурация приложения."""
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""Настройки из переменных окружения."""
postgres_host: str = "db"
postgres_port: int = 5432
postgres_db: str = "lms_it_oms"
postgres_user: str = "lms"
postgres_password: str = ""
content_path: str = "" # Путь к каталогу content (в Docker: /content)
@property
def database_url(self) -> str:
return (
f"postgresql://{self.postgres_user}:{self.postgres_password}"
f"@{self.postgres_host}:{self.postgres_port}/{self.postgres_db}"
)
class Config:
env_file = ".env"
env_prefix = ""
settings = Settings()