chore(env): synchronize env.default and stabilize API config

Updated env.default with self-documenting comments and all active environment variables. Hardened conf/aether_api_config.py to ensure SMTP and FILES_PATH dictionaries are preserved during refactors. Integrated v3 websocket routes into Nginx template.
This commit is contained in:
Scott Idem
2026-02-06 13:15:48 -05:00
parent a303b23d54
commit 49539d52c1
5 changed files with 182 additions and 58 deletions

View File

@@ -5,7 +5,7 @@ from typing import Any, Dict, List, Optional, Union
class Settings(BaseSettings):
AETHER_CFG: Dict[str, Any] = {
"id": os.getenv('AE_CFG_ID', '0')
"id": os.getenv('AE_CFG_ID', 0)
}
JWT_KEY: str = os.getenv('AE_API_JWT_KEY', 'EHmSXZFKfMEW65E8kxCKmQ')
@@ -48,8 +48,31 @@ class Settings(BaseSettings):
"port": os.getenv('AE_REDIS_PORT', '6379')
}
# --- CRITICAL CONFIGURATIONS ---
# The following dictionaries are REQUIRED by the application logic.
# Do not remove them during refactors, as the app (e.g., lib_email.py)
# accesses these attributes directly on the settings object.
# Send SMTP Email
# Used by app/lib_email.py for outbound communications.
SMTP: Dict[str, str] = {
"server": os.getenv('AE_SMTP_SERVER', 'linode.oneskyit.com'),
"port": os.getenv('AE_SMTP_PORT', '465'),
"username": os.getenv('AE_SMTP_USERNAME', 'send_mail'),
"password": os.getenv('AE_SMTP_PASSWORD', 'set-in-ae-sql-db-cnf-tbl')
}
# Server Hosted File Paths
# Used extensively for file uploads, downloads, and exports.
FILES_PATH: Dict[str, str] = {
"hosted_files_root": os.getenv('AE_FILES_PATH_ROOT', '/srv/hosted_files'),
"hosted_tmp_root": os.getenv('AE_FILES_PATH_TMP', '/srv/hosted_tmp')
}
# --- END CRITICAL CONFIGURATIONS ---
# CORS
ORIGINS_REGEX: str = os.getenv('AE_API_ORIGINS_REGEX', '(https://.*\.oneskyit\.com)|(https://.*\.oneskyit\.com:4443)')
ORIGINS: List[str] = ['https://oneskyit.com']
settings = Settings()
settings = Settings()