Ticket form: new stack + description step

This commit is contained in:
AI Assistant
2025-11-14 19:06:36 +03:00
parent 3d121054ab
commit 3306d01e0d
16 changed files with 488 additions and 73 deletions

View File

@@ -1,23 +1,28 @@
"""
Конфигурация приложения
"""
from pathlib import Path
from pydantic_settings import BaseSettings
from functools import lru_cache
from typing import List
BASE_DIR = Path(__file__).resolve().parents[2]
ENV_PATH = BASE_DIR / ".env"
class Settings(BaseSettings):
# ============================================
# APPLICATION
# ============================================
app_name: str = "ERV Insurance Platform"
app_name: str = "Ticket Form Intake 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"
backend_url: str = "http://localhost:8200"
frontend_url: str = "http://localhost:5175"
# ============================================
# DATABASE (PostgreSQL)
@@ -49,7 +54,7 @@ class Settings(BaseSettings):
redis_port: int = 6379
redis_password: str = "CRM_Redis_Pass_2025_Secure!"
redis_db: int = 0
redis_prefix: str = "erv:"
redis_prefix: str = "ticket_form:"
@property
def redis_url(self) -> str:
@@ -147,7 +152,7 @@ class Settings(BaseSettings):
# ============================================
# CORS
# ============================================
cors_origins: str = "http://localhost:5173,http://147.45.146.17:5173,https://erv-claims.clientright.ru,http://crm.clientright.ru"
cors_origins: str = "http://localhost:5175,http://127.0.0.1:5175,http://147.45.146.17:5175"
@property
def cors_origins_list(self) -> List[str]:
@@ -168,10 +173,10 @@ class Settings(BaseSettings):
# LOGGING
# ============================================
log_level: str = "INFO"
log_file: str = "/app/logs/erv_platform.log"
log_file: str = "/app/logs/ticket_form_backend.log"
class Config:
env_file = "/var/www/fastuser/data/www/crm.clientright.ru/erv_platform/.env"
env_file = str(ENV_PATH)
case_sensitive = False
extra = "ignore" # Игнорируем лишние поля из .env