"""应用配置""" from pydantic_settings import BaseSettings from typing import Optional class Settings(BaseSettings): """应用设置""" # 应用基础配置 APP_NAME: str = "BtToxin Pipeline" APP_VERSION: str = "1.0.0" DEBUG: bool = False # API 配置 API_V1_STR: str = "/api/v1" # 数据库 DATABASE_URL: str = "postgresql://postgres:password@localhost:5432/bttoxin" # Redis REDIS_URL: str = "redis://localhost:6379/0" # S3/MinIO S3_ENDPOINT: Optional[str] = None S3_ACCESS_KEY: str = "" S3_SECRET_KEY: str = "" S3_BUCKET: str = "bttoxin-results" S3_REGION: str = "us-east-1" # Docker DOCKER_IMAGE: str = "quay.io/biocontainers/bttoxin_digger:1.0.10--hdfd78af_0" # 文件路径 UPLOAD_DIR: str = "uploads" RESULTS_DIR: str = "results" # Celery CELERY_BROKER_URL: str = "redis://localhost:6379/0" CELERY_RESULT_BACKEND: str = "redis://localhost:6379/0" # CORS CORS_ORIGINS: list = ["http://localhost:3000", "http://localhost:5173"] class Config: env_file = ".env" case_sensitive = True settings = Settings()