32 lines
940 B
Python
32 lines
940 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
class Settings(BaseSettings):
|
|
# S3 settings
|
|
s3_endpoint: str = "http://localhost:9000"
|
|
s3_access_key: str = "minioadmin"
|
|
s3_secret_key: str = "minioadmin"
|
|
s3_bucket: str = "document-bucket"
|
|
s3_region: str = "us-east-1"
|
|
|
|
# Service settings
|
|
host: str = "0.0.0.0"
|
|
port: int = 8082
|
|
|
|
# File size limits (bytes)
|
|
max_file_size_pdf: int = 50 * 1024 * 1024 # 50MB
|
|
max_file_size_docx: int = 25 * 1024 * 1024 # 25MB
|
|
max_file_size_xlsx: int = 25 * 1024 * 1024 # 25MB
|
|
max_file_size_jpg: int = 10 * 1024 * 1024 # 10MB
|
|
max_file_size_jpeg: int = 10 * 1024 * 1024 # 10MB
|
|
max_file_size_png: int = 10 * 1024 * 1024 # 10MB
|
|
max_file_size_gif: int = 10 * 1024 * 1024 # 10MB
|
|
max_file_size_default: int = 10 * 1024 * 1024 # 10MB
|
|
|
|
# Logging
|
|
log_level: str = "INFO"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
settings = Settings()
|