From f9fbcdbbc5dd55481afbf930c0a43c81b6ad61dc Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Sun, 29 Nov 2026 13:13:02 +0100 Subject: [PATCH] Map data pull: of kiwix/ only the served wikipedia.zim, not the other ZIMs lying there (65 GB) --- app.rb | 6 ++++-- docs/deployment.adoc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.rb b/app.rb index bb33941..1411a10 100644 --- a/app.rb +++ b/app.rb @@ -224,8 +224,10 @@ module Maptool # Map data the server hands its clients (GET /api/sync/maps, pulled by # bin/pull-maps.sh — one way, the server builds it): these files and # everything under these directories of DATA_DIR. - MAP_SYNC_FILES = %w[offline.pmtiles offline.pmtiles.meta.json terrain.pmtiles terrain.pmtiles.meta.json offline_regions.json].freeze - MAP_SYNC_DIRS = %w[routing places hiking_trails kiwix nps].freeze + # Of kiwix/ only the ZIM kiwix-serve is given (other ZIMs lying there are GBs). + MAP_SYNC_FILES = %w[offline.pmtiles offline.pmtiles.meta.json terrain.pmtiles terrain.pmtiles.meta.json offline_regions.json + kiwix/wikipedia.zim].freeze + MAP_SYNC_DIRS = %w[routing places hiking_trails nps].freeze # { "relative/path" => absolute path } of the map data there is now; # hidden and temporary files (.rsync-partial, *.part, *.tmp) left out, diff --git a/docs/deployment.adoc b/docs/deployment.adoc index 28a0462..bf0dfcf 100644 --- a/docs/deployment.adoc +++ b/docs/deployment.adoc @@ -253,7 +253,7 @@ goes operational by itself, so no `nmt_start`. `bin/pull-maps.sh`, run by `maptool-pull-maps.timer` (10 min after boot, then every 6 h) as `randy`: pulls the pmtiles, routing, places, hiking -trails, the ZIM and the NPS maps from brick over HTTPS — the same public +trails, the ZIM kiwix serves (`kiwix/wikipedia.zim`, not other ZIMs there) and the NPS maps from brick over HTTPS — the same public URL and `SYNC_TOKEN` as the library sync (read from `.env`), so no SSH or VPN. brick lists them (`GET /api/sync/maps`: size, mtime, path; the list of files is app.rb's `MAP_SYNC_FILES`/`MAP_SYNC_DIRS`) and serves each