nomadro/apps/api/services/work_svc/config.py
Eric 2b574f7957 Ship native /social/work: Planka-shaped boards + Etherpad pads on FastAPI.
Secondary-dev Next UI with DnD, labels, stopwatch, archive, activity; pads with revisions; README documents pnpm dev:work-api.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 01:06:26 +08:00

19 lines
490 B
Python

from __future__ import annotations
import os
from pathlib import Path
WORK_ENABLED = os.getenv("WORK_ENABLED", "1").strip().lower() not in {
"0",
"false",
"no",
"off",
}
DATA_DIR = Path(os.getenv("WORK_DATA_DIR", "/var/lib/nomadro/work"))
if not DATA_DIR.exists():
# local / Windows fallback
DATA_DIR = Path(os.getenv("WORK_DATA_DIR_LOCAL", "")).resolve() if os.getenv("WORK_DATA_DIR_LOCAL") else Path.cwd() / "data" / "work"
DB_PATH = DATA_DIR / "work.sqlite3"