Fix kiwix ZIM volume mount to work with a symlink
Bind-mounting data/kiwix/ (the directory) meant a symlink placed inside it broke: the container has to resolve that symlink itself, in its own filesystem, where the host path it points to doesn't exist. Binding the exact data/kiwix/wikipedia.zim file path instead resolves it on the host at mount time (plain mount(2) semantics), so the real ZIM can live anywhere on the host without duplicating a multi-GB file into this repo's data/ directory.
This commit is contained in:
1 parent
24ac5931f8
commit
c66ae8d2d0
2 files changed
+18
-2
No files matched your search
@@ -89,7 +89,14 @@ self-contained archive, obtain one locally:
|
||||
browsing images offline doesn't matter here.
|
||||
* Download it to `data/kiwix/wikipedia.zim` (the exact filename
|
||||
`docker-compose.yaml`'s `kiwix` service expects — rename after
|
||||
downloading, Kiwix's own filenames are much more specific).
|
||||
downloading, Kiwix's own filenames are much more specific). A symlink
|
||||
there works too (`ln -s /wherever/the-real-file.zim
|
||||
data/kiwix/wikipedia.zim`), so the real file doesn't have to sit inside
|
||||
this repo's checkout at all — the compose file's volume binds that exact
|
||||
path, not the `data/kiwix/` directory, specifically so this resolves
|
||||
correctly (a symlink *inside* an already-mounted directory wouldn't: the
|
||||
container would have to resolve it itself, in its own filesystem, where
|
||||
the host path it points to doesn't exist).
|
||||
|
||||
Once it's there, `docker compose up -d kiwix` (or a full restart)
|
||||
picks it up — `GET /api/kiwix` reports `available: true` and the
|
||||
|
||||
Reference in new issue
Block a user