fix: redirect ~/.9router to DATA_DIR in Docker to persist usage data across updates (closes #585) (#658)

This commit is contained in:
Anurag Saxena
2026-05-03 04:18:06 -04:00
committed by GitHub
parent 52ad3b6630
commit e1c092c297
2 changed files with 7 additions and 4 deletions

View File

@@ -1078,9 +1078,9 @@ Notes:
### Runtime Files and Storage
- Main app state: `${DATA_DIR}/db.json` (providers, combos, aliases, keys, settings), managed by `src/lib/localDb.js`.
- Usage history and logs: `~/.9router/usage.json` and `~/.9router/log.txt`, managed by `src/lib/usageDb.js`.
- Usage history and logs: `${DATA_DIR}/usage.json` and `${DATA_DIR}/log.txt`, managed by `src/lib/usageDb.js`.
- Optional request/translator logs: `<repo>/logs/...` when `ENABLE_REQUEST_LOGS=true`.
- Usage storage currently follows `~/.9router` path logic and is independent from `DATA_DIR`.
- Both `${DATA_DIR}` and `~/.9router` resolve to the same location in a Docker container — the symlink `/root/.9router -> /app/data` is created at build time.
</details>