maybe good
This commit is contained in:
47
app/config.py
Normal file
47
app/config.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
Delphi Consulting Group Database System - Configuration
|
||||
"""
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application configuration"""
|
||||
|
||||
# Application
|
||||
app_name: str = "Delphi Consulting Group Database System"
|
||||
app_version: str = "1.0.0"
|
||||
debug: bool = False
|
||||
|
||||
# Database
|
||||
database_url: str = "sqlite:///./data/delphi_database.db"
|
||||
|
||||
# Authentication
|
||||
secret_key: str = "your-secret-key-change-in-production"
|
||||
algorithm: str = "HS256"
|
||||
access_token_expire_minutes: int = 30
|
||||
|
||||
# Admin account settings
|
||||
admin_username: str = "admin"
|
||||
admin_password: str = "change-me"
|
||||
|
||||
# File paths
|
||||
upload_dir: str = "./uploads"
|
||||
backup_dir: str = "./backups"
|
||||
|
||||
# Pagination
|
||||
default_page_size: int = 50
|
||||
max_page_size: int = 200
|
||||
|
||||
# Docker/deployment settings
|
||||
external_port: Optional[str] = None
|
||||
allowed_hosts: Optional[str] = None
|
||||
cors_origins: Optional[str] = None
|
||||
secure_cookies: bool = False
|
||||
compose_project_name: Optional[str] = None
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user