From 3443c1c65e9f1753e1e656b35d08416c1fa298f2 Mon Sep 17 00:00:00 2001 From: godosa Date: Wed, 7 Oct 2026 00:14:38 +0200 Subject: worldmap-viewer: initial public history --- deploy/README.md | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 deploy/README.md (limited to 'deploy/README.md') diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 0000000..4ce6a0a --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,101 @@ +# Public map server (container) + +A read-only map for anyone, on a small shared machine. Worlds are **built elsewhere** (a build needs far more memory +and time than serving) and copied over; the container holds only code. + +## 1. Build the image + +From the folder that holds `worldgen/` and `worldmap-viewer/`: + +```sh +podman build -f worldmap-viewer/deploy/Containerfile --ignorefile worldmap-viewer/deploy/.containerignore \ + -t worldmap-viewer . +``` + +`requirements.lock` pins the libraries the worlds were built and checked with (same numbers → the same tiles as on +the build machine). + +## 2. Copy a world + +```sh +python deploy.py bundle WORLD_DIR server:/srv/data/map/WORLD_NAME [--res N] # --dry-run lists it first +``` + +Copies `config/`, `places/regions.json` and `out/r/`, leaving out: + +- pins, exports, lore notes and build inputs, which a public server never serves; +- refined areas and tiles of earlier builds. + +It uses `rsync -a`, which keeps modification times. The build fingerprint depends on them; without them, the +server would rebuild every refined area. Nothing is deleted on the server: it prunes what it no longer uses at +start, and keeps the tiles it rendered. + +Then, on the server, let the eras' serve caches share their identical blocks again (a copy loses that; ≈ half +their size on btrfs or reflink XFS): + +```sh +podman exec worldmap-viewer python deploy.py dedupe /data/WORLD_NAME +``` + +Data disk: btrfs with `compress=zstd:1`, normal copy-on-write (no `chattr +C`/`nodatacow`: that turns off both +compression and block sharing). Back up nothing under `out/`: it can all be copied again. + +## 3. Run it + +Settings come from `WORLDMAP_