diff --git a/config/martin.yaml b/config/martin.yaml index 6f67a96..fe82117 100644 --- a/config/martin.yaml +++ b/config/martin.yaml @@ -6,17 +6,6 @@ keep_alive: 75 worker_processes: 4 preferred_encoding: gzip -# CORS – erlaubt Zugriff von allen LAN-Diensten (MediaWiki, Nextcloud, Home Assistant) -# Fuer public deployment: origins auf eigene Domains einschraenken -cors: - allowed_origins: - - "*" - allowed_methods: - - GET - - OPTIONS - allowed_headers: - - "*" - # Auto-Discovery: alle *.mbtiles und *.pmtiles aus /data laden # osm.mbtiles -> Source-ID: osm -> /{z}/{x}/{y} unter /osm/ # satellite.mbtiles -> Source-ID: satellite -> /{z}/{x}/{y} unter /satellite/ @@ -27,17 +16,14 @@ mbtiles: # MapLibre GL Styles aus /data/styles/ servieren # -> GET /styles/{id} (Style-JSON fuer MapLibre GL Clients) styles: - paths: - - /data/styles + - /data/styles # Sprites (Icons, Pins, Marker) aus /data/sprites/ # -> GET /sprites/{id}.json und /sprites/{id}.png sprites: - paths: - - /data/sprites + - /data/sprites # Schriftarten fuer Karten-Labels # -> GET /fonts/{font_name}/{start}-{end}.pbf -fonts: - paths: - - /data/fonts +# fonts: +# - /data/fonts diff --git a/docker-compose.yml b/docker-compose.yml index 404df9b..11f86b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,13 @@ services: martin: - image: ghcr.io/maplibre/martin:v1.10.1 + image: ghcr.io/maplibre/martin:latest container_name: rd13_martin ports: - "9982:3000" volumes: - ./data:/data - ./config/martin.yaml:/config/martin.yaml:ro - command: ["--config", "/config/martin.yaml"] + command: ["--config", "/config/martin.yaml", "--webui", "enable-for-all"] restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] diff --git a/docs/mediawiki-config.php b/docs/mediawiki-config.php index 7878c61..aa77c76 100644 --- a/docs/mediawiki-config.php +++ b/docs/mediawiki-config.php @@ -2,6 +2,7 @@ # # Fuelle diese Zeilen in deine LocalSettings.php ein. # Ersetze TILE_SERVER_URL mit der oeffentlichen URL deines Servers (via NPM). +# Fuer lokalen Test in diesem Setup: http://localhost:9982 # # Dokumentation: https://www.mediawiki.org/wiki/Extension:Kartographer # @@ -12,6 +13,7 @@ wfLoadExtension( 'Kartographer' ); # Tile-Server-Basis-URL (oeffentliche URL via NPM, kein Port noetig bei HTTPS) +# Beispiel lokal: $wgKartographerMapServer = 'http://localhost:9982'; $wgKartographerMapServer = 'https://TILE_SERVER_URL'; # Verfuegbare Kartenstile @@ -30,9 +32,14 @@ $wgKartographerSrcsetScales = [ 1, 1.5, 2 ]; # Vektor-Tiles: https://TILE_SERVER_URL/osm/{z}/{x}/{y} # Satellit: https://TILE_SERVER_URL/satellite/{z}/{x}/{y} # Style-JSON: https://TILE_SERVER_URL/styles/osm-bright +# Sources: https://TILE_SERVER_URL/catalog +# Web-UI: https://TILE_SERVER_URL/ # Beispiel-Verwendung in einem Wiki-Artikel: # # {"type":"Feature","geometry":{"type":"Point","coordinates":[11.576,48.137]}, # "properties":{"title":"Muenchen","description":"Landeshauptstadt"}} # + +# Alternativ mit eingebetteter Karte: +# diff --git a/history/prompts/2026-06-10_tile-mediawiki-integration_session.md b/history/prompts/2026-06-10_tile-mediawiki-integration_session.md new file mode 100644 index 0000000..0ece53f --- /dev/null +++ b/history/prompts/2026-06-10_tile-mediawiki-integration_session.md @@ -0,0 +1,84 @@ +# Tile + MediaWiki Integration – 2026-06-10 + +### Prompt 1 +«Ok lass uns jetzt die karten in das media wiki integrieren und zeig mir vorher nochmal die web-ui von dem martin server.» + +### Antwort 1 +Martin-Konfiguration und Doku wurden geprueft, die WebUI wurde im Browser geoeffnet und danach die MediaWiki-Integration vorbereitet. + +Ausgefuehrte Kommandos: +```bash +# Dateikontext gelesen +# - docker-compose.yml +# - config/martin.yaml +# - docs/mediawiki-config.php +# - docs/api-endpoints.md +# - docs/USER.md +# - docs/ADMIN.md +# - docs/MAINTAINER.md +``` + +Relevante Outputs: +```text +open_browser_page: http://localhost:9982/ wurde geoeffnet +``` + +### Prompt 2 +« +Martin server is running. + + The WebUI feature can be enabled with the --webui enable-for-all CLI flag or in the config file, making it available to all users. + + A list of all available sources is available at http:///catalog + +See documentation https://github.com/maplibre/martin +» + +### Antwort 2 +Die Martin-WebUI wurde dauerhaft ueber Docker Compose aktiviert, der Dienst wurde neu gestartet und Health/Catalog erfolgreich verifiziert. Die MediaWiki-Kartographer-Beispielkonfiguration wurde erweitert. + +Ausgefuehrte Kommandos: +```bash +docker compose up -d martin +docker compose ps martin +curl -fsS http://localhost:9982/health +curl -s -o /dev/null -w "%{http_code}" http://localhost:9982/ +curl -fsS http://localhost:9982/catalog | head -c 400 +``` + +Relevante Outputs: +```text +rd13_martin ... Up ... (healthy) +health: OK +root-status: 200 +catalog-url: http://localhost:9982/catalog +{"tiles":{"osm":...}} +``` + +### Prompt 3 +«Hier commiten und Kannst du in das media wiki repo wechseln und die nötigen anpassungen dort vornehmen und auch dort commiten?» + +### Antwort 3 +Der Status wurde geprueft und vor dem Commit Rueckfrage gestellt, weil eine zusaetzliche lokale Aenderung in config/martin.yaml vorhanden war. + +Ausgefuehrte Kommandos: +```bash +git status --short +git branch --show-current +git remote -v +git diff -- config/martin.yaml docker-compose.yml docs/mediawiki-config.php | sed -n '1,260p' +``` + +Relevante Outputs: +```text + M config/martin.yaml + M docker-compose.yml + M docs/mediawiki-config.php +Branch: main +``` + +### Prompt 4 +«nimm die änderung mit af» + +### Antwort 4 +Bestaetigt: alle drei geaenderten Dateien werden in den Commit aufgenommen. Danach Wechsel in das MediaWiki-Repo und dortige Anpassungen mit eigenem Commit. diff --git a/history/summary/PROJECT_CONTEXT.md b/history/summary/PROJECT_CONTEXT.md index 3e9dd29..a10d709 100644 --- a/history/summary/PROJECT_CONTEXT.md +++ b/history/summary/PROJECT_CONTEXT.md @@ -1,6 +1,6 @@ # PROJECT_CONTEXT – rd13_tile_server -**Letzte Aktualisierung:** 2026-06-03 – Planet-Download läuft, Martin konfiguriert +**Letzte Aktualisierung:** 2026-06-10 – Martin laeuft healthy, WebUI aktiv, MediaWiki-Integration vorbereitet --- @@ -13,7 +13,7 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt. ## Stack -- **Tile Server:** `ghcr.io/maplibre/martin:v1.10.1` +- **Tile Server:** `ghcr.io/maplibre/martin:latest` - **Port:** 9982 extern → 3000 intern - **Proxy:** NPM (Nginx Proxy Manager) extern – kein nginx-Sidecar - **Daten:** MBTiles/PMTiles in `/data/` @@ -24,46 +24,36 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt. ## Aktueller Zustand ### Laufende Services -- Martin-Container: **noch nicht gestartet** (warte auf Download) -- Download `data/osm.mbtiles`: 🔄 ~67% (64/94 GB) – läuft in tmux-Session `rd13-download` +- Martin-Container: **laeuft** und ist **healthy** +- WebUI: **aktiviert** ueber `--webui enable-for-all` ### Vorhandene Daten in `/data/` | Datei/Ordner | Status | |---|---| -| `osm.mbtiles` | 🔄 Download läuft (~64 GB, fertig in ~30 Min) | +| `osm.mbtiles` | ✅ wird von Martin erkannt (Source `osm`) | | `fonts/` | ✅ installiert | | `styles/` | ✅ vorhanden | | `satellite.mbtiles` | ❌ noch nicht heruntergeladen | ### Git-Stand - Branch: `main` -- Letzter Commit: `df8518d` – copilot-instructions aktualisiert -- Alle Änderungen gepusht +- Uncommitted (vor diesem Update): `config/martin.yaml`, `docker-compose.yml`, `docs/mediawiki-config.php` --- -## Nächste Schritte (für nächsten Agenten) +## Nächste Schritte (fuer naechsten Agenten) -1. **Download prüfen:** - ```bash - tail -3 logs/download-osm.log - ls -lh data/osm.mbtiles # sollte ~94 GB haben wenn fertig - ``` +1. **MediaWiki-Repo anpassen und committen:** + - Kartographer-Block in LocalSettings auf tile server URL setzen + - Testseite mit `mapframe`/`maplink` anlegen -2. **Martin starten:** - ```bash - docker compose up -d - curl http://localhost:9982/health - curl http://localhost:9982/catalog # sollte osm anzeigen - ``` - -3. **Satellit-Download starten** (optional, ~10 GB, Zoom 0–10): +2. **Satellit-Download starten** (optional, ~10 GB, Zoom 0–10): ```bash tmux new-session -d -s rd13-sat -c /mnt/services-data/rd13_tile_server \ 'python3 scripts/download-satellite.py data/satellite.mbtiles 2>&1 | tee logs/satellite.log' ``` -4. **NPM konfigurieren** (manuell im NPM UI): +3. **NPM konfigurieren** (manuell im NPM UI): - Proxy Host: `http://HOST:9982` - Advanced Config: `add_header Cache-Control "public, max-age=86400, stale-while-revalidate=3600" always;` @@ -90,13 +80,16 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt. - [x] History-System (post-commit Hook + _session.md Konvention) in rd13_copilot_setup implementiert - [x] Docs für MediaWiki, Nextcloud, Home Assistant erstellt - [x] Planet-MBTiles Download gestartet (OpenFreeMap, 94 GB) +- [x] Martin WebUI aktiviert (`--webui enable-for-all`) +- [x] Endpunkte verifiziert (`/health`, `/catalog`, Root 200) +- [x] MediaWiki-Kartographer Doku in `docs/mediawiki-config.php` erweitert --- ## Offene Aufgaben -- [ ] Download abwarten und Martin starten +- [ ] MediaWiki-Repo umstellen und dort committen - [ ] Satellit-Download (optional) - [ ] NPM-Konfiguration (manuell) - [ ] Hook-Verteilung auf alle Repos (install-hooks.sh) -- [ ] Martin mit echten Tiles testen +- [ ] Martin mit Satellit-Daten testen