ソースを参照

news-mcp: document persistence and sync workflow

Lukas Goldschmidt 1 ヶ月 前
コミット
5004317ae6
1 ファイル変更27 行追加0 行削除
  1. 27 0
      README.md

+ 27 - 0
README.md

@@ -89,6 +89,33 @@ Key variables:
 
 When embeddings are enabled, news-mcp tries Ollama first and falls back to the existing heuristic clustering path if Ollama is unavailable.
 
+## Persistence and migration
+
+The default database path is project-relative:
+
+- `NEWS_MCP_DATA_DIR=./data`
+- `NEWS_MCP_DB_PATH=./data/news.sqlite`
+
+That keeps persistence inside the repository tree in both local and Docker runs.
+
+Recommended workflow:
+
+1. Keep **code** in Git.
+2. Keep the **data directory** outside Git but inside the project tree.
+3. Use `rsync` for the initial data transfer to a remote server.
+4. After that, move code with Git and move data only when you actually need a fresh copy.
+
+Example initial transfer:
+
+```bash
+rsync -a ./data/ user@remote:/srv/news-mcp/data/
+```
+
+If you change the location later, override the defaults with:
+
+- `NEWS_MCP_DATA_DIR`
+- `NEWS_MCP_DB_PATH`
+
 ## TTL vs pruning
 
 These are intentionally different: