Ship portal module + /api/social/v1 SQLite backend separate from /community; update README for MiroTalk CSP and test5 as the next development branch. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
428 B
Python
12 lines
428 B
Python
from __future__ import annotations
|
||
|
||
import os
|
||
from pathlib import Path
|
||
|
||
# 默认写在仓库 data/social,与 PocketBase / community 目录分离
|
||
_ROOT = Path(__file__).resolve().parents[4] # nomadro/
|
||
_DEFAULT_DB = _ROOT / "data" / "social" / "social.db"
|
||
|
||
SOCIAL_DB_PATH = Path(os.getenv("SOCIAL_DB_PATH", str(_DEFAULT_DB))).resolve()
|
||
SOCIAL_ENABLED = os.getenv("SOCIAL_ENABLED", "true").lower() in {"1", "true", "yes", "on"}
|