nomadro/apps/api/services/social_svc/config.py
Eric 6e15868e04 Add isolated 游民社区 (/social) with social_svc and document test5.
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>
2026-11-01 11:24:21 +08:00

12 lines
428 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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"}