Dockerfile / config.py
kkthakur's picture
Deploy Local Hybrid Engine
b336134
Raw
History Blame Contribute Delete
785 Bytes
"""
Application configuration.
Swap values via environment variables in production.
"""
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Storage paths
DATA_DIR = os.path.join(BASE_DIR, "data", "sessions")
UPLOAD_DIR = os.path.join(BASE_DIR, "data", "uploads")
AUDIT_DB_PATH = os.path.join(BASE_DIR, "data", "audit.db")
# Files above this size use LazyFrame streaming instead of eager loading
LAZY_THRESHOLD_BYTES = 100 * 1024 * 1024 # 100 MB
# Fuzzy matching threshold (0-100)
FUZZY_THRESHOLD = 78
# Max file upload size: 1 GB
MAX_UPLOAD_BYTES = 1024 * 1024 * 1024
# Session auto-cleanup after idle minutes
SESSION_TTL_MINUTES = 120
# Ensure directories exist
for _d in (DATA_DIR, UPLOAD_DIR, os.path.dirname(AUDIT_DB_PATH)):
os.makedirs(_d, exist_ok=True)