standalone without our server: basemap and DEM load from the CORS-enabled upstreams, same-origin proxy only when a probe proves it exists; drop dead kumi.systems mirror

This commit is contained in:
Richard Zink committed 2026-10-11 16:02:10 +02:00
1 parent 3395ac8f8e
commit 499c00d8b1
3 files changed
+62 -19

No files matched your search

+14 -6
View File
@@ -68,8 +68,12 @@ The bundled nginx config (`default.conf`) is more than a file server:
- `Cache-Control: no-store` for HTML and JS, so a changed `CONFIG` takes effect
on reload.
A plain static server without these proxies (e.g. `python3 -m http.server
58881`) runs the UI, but terrain, basemap and road data will not load.
The proxies are a convenience, not a requirement: every data source is also
reachable directly from the browser (ESRI, the AWS elevation bucket and the
Overpass mirrors all answer cross-origin requests), and the page probes for
`/terrarium/` and `/esri/...` at start-up and switches to the proxy only when
this same-origin proxy actually exists. Running the files from any static
server therefore works as well - just without the nginx-side Overpass cache.
## Single-file build
@@ -86,10 +90,14 @@ python3 build.py --check # build to a temp file and verify, write not
`--check` fails if anything is left that would need a sibling file (an external
`<script src>` or a CSS `<link>`).
Runtime *data* is still fetched at load (tiles, Overpass, weather): serve the
file from the Docker image for the full experience. Opened via `file://` or a
proxy-less server it renders sky, clouds and UI with an "OFFLINE"-labelled
ground grid instead of basemap tiles.
Runtime *data* is fetched at load, but from public sources only: ESRI basemap
tiles, the AWS elevation tiles and the Overpass mirrors are all CORS-enabled,
and Open-Meteo needs no key. So the built file runs on its own - from any
static server, and even opened directly via `file://`. Serving it from the
Docker image additionally gives the nginx proxies and the 30-day Overpass
cache, which is the gentlest option for the upstreams. If a source is
unreachable, the scene degrades instead of failing: an "OFFLINE"-labelled
ground grid in place of basemap tiles.
## Configuration