mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Тесты для бекенда
This commit is contained in:
@@ -1,20 +1,36 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
"""Settings configuration"""
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
class Settings(BaseSettings):
|
||||
DATABASE_URL: str = "postgresql://postgres:postgres123@db:5432/support_db"
|
||||
REDIS_URL: str = "redis://redis:6379/0"
|
||||
"""Application settings"""
|
||||
PROJECT_NAME: str = "Support Service"
|
||||
VERSION: str = "1.0.0"
|
||||
API_V1_STR: str = "/api"
|
||||
|
||||
# JWT settings
|
||||
JWT_SECRET_KEY: str = "your-secret-key" # в продакшене использовать сложный ключ
|
||||
JWT_ALGORITHM: str = "HS256"
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql://postgres:postgres123@db:5432/support_db"
|
||||
|
||||
# JWT
|
||||
SECRET_KEY: str = "your-secret-key"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
|
||||
# Telegram settings
|
||||
TELEGRAM_BOT_TOKEN: Optional[str] = None
|
||||
TELEGRAM_CHAT_ID: Optional[str] = None
|
||||
# Redis
|
||||
REDIS_HOST: str = "redis"
|
||||
REDIS_PORT: int = 6379
|
||||
|
||||
# Admin
|
||||
ADMIN_USERNAME: str = "admin"
|
||||
ADMIN_PASSWORD: str = "admin123"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
# Telegram
|
||||
TELEGRAM_BOT_TOKEN: str = "your-bot-token"
|
||||
TELEGRAM_CHAT_ID: str = "your-chat-id"
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
case_sensitive=True
|
||||
)
|
||||
|
||||
settings = Settings()
|
Reference in New Issue
Block a user