mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
6c87bf2f7a
The /help pages fetched their markdown from raw.githubusercontent.com at
runtime, so a self-hosted install was served docs from main rather than the
version it was actually running, and help was unusable without network access.
The wiki/ directory was in the repo the whole time; the bundled-snapshot
fallback the code reached for was gitignored and never populated by any build
step, so it was dead code.
Read wiki/ straight from disk instead. server/{src,dist}/services both sit
three levels under the repo root, so a single __dirname anchor resolves in dev,
a built source install, vitest and Docker with no copy or build step. GitHub is
kept strictly as a fallback for when the directory cannot be resolved, decided
once at load by probing for _Sidebar.md: a page missing from a present wiki is
a genuine 404, since falling back per-file would reintroduce the version skew
this removes.
Ship wiki/ in the image: .dockerignore excluded it outright, so the COPY alone
would have produced an image with no wiki, and the GitHub fallback would have
masked that at runtime. Add a real path-containment check on assets now that
the path becomes a filesystem read rather than a URL, and document
TREK_WIKI_DIR as an off-by-default escape hatch across the deployment configs.
37 lines
410 B
Plaintext
37 lines
410 B
Plaintext
node_modules
|
|
client/node_modules
|
|
server/node_modules
|
|
client/dist
|
|
shared/dist
|
|
data
|
|
uploads
|
|
.git
|
|
.github
|
|
**/.env
|
|
**/.env.*
|
|
*.log
|
|
*.md
|
|
!client/**/*.md
|
|
chart/
|
|
docs/
|
|
docker-compose.yml
|
|
unraid-template.xml
|
|
*.sqlite
|
|
*.sqlite-shm
|
|
*.sqlite-wal
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|
|
**/coverage
|
|
.DS_Store
|
|
Thumbs.db
|
|
.vscode
|
|
.idea
|
|
sonar-project.properties
|
|
server/tests/
|
|
server/vitest.config.ts
|
|
**/*.test.ts
|
|
**/*.spec.ts
|
|
scripts/
|
|
charts/
|