69 lines
1.7 KiB
Python
69 lines
1.7 KiB
Python
"""
|
|
Конфигурация приложения
|
|
"""
|
|
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
# App
|
|
app_name: str = "ERV Insurance Platform"
|
|
app_env: str = "development"
|
|
debug: bool = True
|
|
|
|
# API
|
|
api_v1_prefix: str = "/api/v1"
|
|
backend_url: str = "http://localhost:8100"
|
|
frontend_url: str = "http://localhost:5173"
|
|
|
|
# PostgreSQL
|
|
postgres_host: str = "147.45.189.234"
|
|
postgres_port: int = 5432
|
|
postgres_db: str = "default_db"
|
|
postgres_user: str = "gen_user"
|
|
postgres_password: str = "2~~9_^kVsU?2\\S"
|
|
|
|
# Redis
|
|
redis_host: str = "localhost"
|
|
redis_port: int = 6379
|
|
redis_password: str = "CRM_Redis_Pass_2025_Secure!"
|
|
redis_db: int = 0
|
|
redis_prefix: str = "erv:"
|
|
|
|
# RabbitMQ
|
|
rabbitmq_host: str = "185.197.75.249"
|
|
rabbitmq_port: int = 5672
|
|
rabbitmq_user: str = "admin"
|
|
rabbitmq_password: str = "tyejvtej"
|
|
rabbitmq_vhost: str = "/"
|
|
|
|
# OCR Service
|
|
ocr_api_url: str = "http://147.45.146.17:8001"
|
|
|
|
# OpenRouter AI
|
|
openrouter_api_key: str = "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"
|
|
openrouter_model: str = "google/gemini-2.0-flash-001"
|
|
|
|
# FlightAware
|
|
flightaware_api_key: str = "Puz0cdxAHzAEqMRZwtdeqBUSm9naJfwK"
|
|
|
|
# CORS
|
|
cors_origins: list = [
|
|
"http://localhost:5173",
|
|
"http://147.45.146.17:5173",
|
|
"https://erv-claims.clientright.ru"
|
|
]
|
|
|
|
class Config:
|
|
env_file = "../.env"
|
|
case_sensitive = False
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings() -> Settings:
|
|
return Settings()
|
|
|
|
|
|
settings = get_settings()
|
|
|