first
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""Minimal configuration surface for asf-context service.
|
||||
|
||||
Keeps parity with asf-core config. Can be grown independently.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import lru_cache
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class ContextSettings(BaseSettings):
|
||||
mongo_uri: str = "mongodb://172.19.40.102:27017,172.19.40.103:27017/asf?replicaSet=rs0"
|
||||
mongo_db: str = "asf"
|
||||
|
||||
rabbitmq_uri: str = "amqp://azurian:StrongPassword123!@172.19.40.201:5672/asf"
|
||||
rabbitmq_events_exchange: str = "asf.events"
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def get_settings() -> ContextSettings:
|
||||
return ContextSettings()
|
||||
Reference in New Issue
Block a user