first commit
This commit is contained in:
24
replication_service/config.py
Normal file
24
replication_service/config.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Конфигурация приложения"""
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||||
|
||||
# PostgreSQL Target Connection (назначение для всех репликаций)
|
||||
postgres_host: str
|
||||
postgres_database: str
|
||||
postgres_username: str
|
||||
postgres_password: str
|
||||
postgres_port: int = 5432
|
||||
|
||||
# Redis for Celery
|
||||
redis_host: str = "localhost"
|
||||
redis_port: int = 6379
|
||||
|
||||
# Other settings
|
||||
api_key: Optional[str] = None
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user