30 lines
701 B
Python
30 lines
701 B
Python
from pathlib import Path
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
BACKEND_DIR = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
class Config(BaseSettings):
|
|
DEBUG_MODE: bool = True
|
|
WORKERS: int = 1
|
|
PORT: int = 47173
|
|
MCPPORT: int = 27174
|
|
REDIS_URL: str = 'redis://localhost:6379/1'
|
|
COLG_TOKEN: str = ''
|
|
HELPER_TOKEN: str = ''
|
|
HELPER_ID: str = ''
|
|
BARK_URL: str | None = None
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_file=(
|
|
str(BACKEND_DIR / 'config' / '.env'),
|
|
str(BACKEND_DIR / 'config' / '.env.dev'),
|
|
str(BACKEND_DIR / 'config' / '.env.prod'),
|
|
),
|
|
extra='ignore',
|
|
)
|
|
|
|
|
|
config = Config()
|