feat: enable martin webui and prep mediawiki integration
This commit is contained in:
parent
048805302d
commit
0a5f6cd005
5 changed files with 114 additions and 44 deletions
|
|
@ -6,17 +6,6 @@ keep_alive: 75
|
||||||
worker_processes: 4
|
worker_processes: 4
|
||||||
preferred_encoding: gzip
|
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
|
# Auto-Discovery: alle *.mbtiles und *.pmtiles aus /data laden
|
||||||
# osm.mbtiles -> Source-ID: osm -> /{z}/{x}/{y} unter /osm/
|
# osm.mbtiles -> Source-ID: osm -> /{z}/{x}/{y} unter /osm/
|
||||||
# satellite.mbtiles -> Source-ID: satellite -> /{z}/{x}/{y} unter /satellite/
|
# satellite.mbtiles -> Source-ID: satellite -> /{z}/{x}/{y} unter /satellite/
|
||||||
|
|
@ -27,17 +16,14 @@ mbtiles:
|
||||||
# MapLibre GL Styles aus /data/styles/ servieren
|
# MapLibre GL Styles aus /data/styles/ servieren
|
||||||
# -> GET /styles/{id} (Style-JSON fuer MapLibre GL Clients)
|
# -> GET /styles/{id} (Style-JSON fuer MapLibre GL Clients)
|
||||||
styles:
|
styles:
|
||||||
paths:
|
|
||||||
- /data/styles
|
- /data/styles
|
||||||
|
|
||||||
# Sprites (Icons, Pins, Marker) aus /data/sprites/
|
# Sprites (Icons, Pins, Marker) aus /data/sprites/
|
||||||
# -> GET /sprites/{id}.json und /sprites/{id}.png
|
# -> GET /sprites/{id}.json und /sprites/{id}.png
|
||||||
sprites:
|
sprites:
|
||||||
paths:
|
|
||||||
- /data/sprites
|
- /data/sprites
|
||||||
|
|
||||||
# Schriftarten fuer Karten-Labels
|
# Schriftarten fuer Karten-Labels
|
||||||
# -> GET /fonts/{font_name}/{start}-{end}.pbf
|
# -> GET /fonts/{font_name}/{start}-{end}.pbf
|
||||||
fonts:
|
# fonts:
|
||||||
paths:
|
# - /data/fonts
|
||||||
- /data/fonts
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
services:
|
services:
|
||||||
martin:
|
martin:
|
||||||
image: ghcr.io/maplibre/martin:v1.10.1
|
image: ghcr.io/maplibre/martin:latest
|
||||||
container_name: rd13_martin
|
container_name: rd13_martin
|
||||||
ports:
|
ports:
|
||||||
- "9982:3000"
|
- "9982:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
- ./config/martin.yaml:/config/martin.yaml:ro
|
- ./config/martin.yaml:/config/martin.yaml:ro
|
||||||
command: ["--config", "/config/martin.yaml"]
|
command: ["--config", "/config/martin.yaml", "--webui", "enable-for-all"]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#
|
#
|
||||||
# Fuelle diese Zeilen in deine LocalSettings.php ein.
|
# Fuelle diese Zeilen in deine LocalSettings.php ein.
|
||||||
# Ersetze TILE_SERVER_URL mit der oeffentlichen URL deines Servers (via NPM).
|
# 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
|
# Dokumentation: https://www.mediawiki.org/wiki/Extension:Kartographer
|
||||||
#
|
#
|
||||||
|
|
@ -12,6 +13,7 @@
|
||||||
wfLoadExtension( 'Kartographer' );
|
wfLoadExtension( 'Kartographer' );
|
||||||
|
|
||||||
# Tile-Server-Basis-URL (oeffentliche URL via NPM, kein Port noetig bei HTTPS)
|
# Tile-Server-Basis-URL (oeffentliche URL via NPM, kein Port noetig bei HTTPS)
|
||||||
|
# Beispiel lokal: $wgKartographerMapServer = 'http://localhost:9982';
|
||||||
$wgKartographerMapServer = 'https://TILE_SERVER_URL';
|
$wgKartographerMapServer = 'https://TILE_SERVER_URL';
|
||||||
|
|
||||||
# Verfuegbare Kartenstile
|
# Verfuegbare Kartenstile
|
||||||
|
|
@ -30,9 +32,14 @@ $wgKartographerSrcsetScales = [ 1, 1.5, 2 ];
|
||||||
# Vektor-Tiles: https://TILE_SERVER_URL/osm/{z}/{x}/{y}
|
# Vektor-Tiles: https://TILE_SERVER_URL/osm/{z}/{x}/{y}
|
||||||
# Satellit: https://TILE_SERVER_URL/satellite/{z}/{x}/{y}
|
# Satellit: https://TILE_SERVER_URL/satellite/{z}/{x}/{y}
|
||||||
# Style-JSON: https://TILE_SERVER_URL/styles/osm-bright
|
# 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:
|
# Beispiel-Verwendung in einem Wiki-Artikel:
|
||||||
# <maplink zoom="12" latitude="48.137" longitude="11.576">
|
# <maplink zoom="12" latitude="48.137" longitude="11.576">
|
||||||
# {"type":"Feature","geometry":{"type":"Point","coordinates":[11.576,48.137]},
|
# {"type":"Feature","geometry":{"type":"Point","coordinates":[11.576,48.137]},
|
||||||
# "properties":{"title":"Muenchen","description":"Landeshauptstadt"}}
|
# "properties":{"title":"Muenchen","description":"Landeshauptstadt"}}
|
||||||
# </maplink>
|
# </maplink>
|
||||||
|
|
||||||
|
# Alternativ mit eingebetteter Karte:
|
||||||
|
# <mapframe text="Muenchen" zoom="12" latitude="48.137" longitude="11.576" width="420" height="300" />
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# PROJECT_CONTEXT – rd13_tile_server
|
# 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
|
## Stack
|
||||||
|
|
||||||
- **Tile Server:** `ghcr.io/maplibre/martin:v1.10.1`
|
- **Tile Server:** `ghcr.io/maplibre/martin:latest`
|
||||||
- **Port:** 9982 extern → 3000 intern
|
- **Port:** 9982 extern → 3000 intern
|
||||||
- **Proxy:** NPM (Nginx Proxy Manager) extern – kein nginx-Sidecar
|
- **Proxy:** NPM (Nginx Proxy Manager) extern – kein nginx-Sidecar
|
||||||
- **Daten:** MBTiles/PMTiles in `/data/`
|
- **Daten:** MBTiles/PMTiles in `/data/`
|
||||||
|
|
@ -24,46 +24,36 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt.
|
||||||
## Aktueller Zustand
|
## Aktueller Zustand
|
||||||
|
|
||||||
### Laufende Services
|
### Laufende Services
|
||||||
- Martin-Container: **noch nicht gestartet** (warte auf Download)
|
- Martin-Container: **laeuft** und ist **healthy**
|
||||||
- Download `data/osm.mbtiles`: 🔄 ~67% (64/94 GB) – läuft in tmux-Session `rd13-download`
|
- WebUI: **aktiviert** ueber `--webui enable-for-all`
|
||||||
|
|
||||||
### Vorhandene Daten in `/data/`
|
### Vorhandene Daten in `/data/`
|
||||||
| Datei/Ordner | Status |
|
| Datei/Ordner | Status |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `osm.mbtiles` | 🔄 Download läuft (~64 GB, fertig in ~30 Min) |
|
| `osm.mbtiles` | ✅ wird von Martin erkannt (Source `osm`) |
|
||||||
| `fonts/` | ✅ installiert |
|
| `fonts/` | ✅ installiert |
|
||||||
| `styles/` | ✅ vorhanden |
|
| `styles/` | ✅ vorhanden |
|
||||||
| `satellite.mbtiles` | ❌ noch nicht heruntergeladen |
|
| `satellite.mbtiles` | ❌ noch nicht heruntergeladen |
|
||||||
|
|
||||||
### Git-Stand
|
### Git-Stand
|
||||||
- Branch: `main`
|
- Branch: `main`
|
||||||
- Letzter Commit: `df8518d` – copilot-instructions aktualisiert
|
- Uncommitted (vor diesem Update): `config/martin.yaml`, `docker-compose.yml`, `docs/mediawiki-config.php`
|
||||||
- Alle Änderungen gepusht
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Nächste Schritte (für nächsten Agenten)
|
## Nächste Schritte (fuer naechsten Agenten)
|
||||||
|
|
||||||
1. **Download prüfen:**
|
1. **MediaWiki-Repo anpassen und committen:**
|
||||||
```bash
|
- Kartographer-Block in LocalSettings auf tile server URL setzen
|
||||||
tail -3 logs/download-osm.log
|
- Testseite mit `mapframe`/`maplink` anlegen
|
||||||
ls -lh data/osm.mbtiles # sollte ~94 GB haben wenn fertig
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Martin starten:**
|
2. **Satellit-Download starten** (optional, ~10 GB, Zoom 0–10):
|
||||||
```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):
|
|
||||||
```bash
|
```bash
|
||||||
tmux new-session -d -s rd13-sat -c /mnt/services-data/rd13_tile_server \
|
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'
|
'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`
|
- Proxy Host: `http://HOST:9982`
|
||||||
- Advanced Config: `add_header Cache-Control "public, max-age=86400, stale-while-revalidate=3600" always;`
|
- 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] History-System (post-commit Hook + _session.md Konvention) in rd13_copilot_setup implementiert
|
||||||
- [x] Docs für MediaWiki, Nextcloud, Home Assistant erstellt
|
- [x] Docs für MediaWiki, Nextcloud, Home Assistant erstellt
|
||||||
- [x] Planet-MBTiles Download gestartet (OpenFreeMap, 94 GB)
|
- [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
|
## Offene Aufgaben
|
||||||
|
|
||||||
- [ ] Download abwarten und Martin starten
|
- [ ] MediaWiki-Repo umstellen und dort committen
|
||||||
- [ ] Satellit-Download (optional)
|
- [ ] Satellit-Download (optional)
|
||||||
- [ ] NPM-Konfiguration (manuell)
|
- [ ] NPM-Konfiguration (manuell)
|
||||||
- [ ] Hook-Verteilung auf alle Repos (install-hooks.sh)
|
- [ ] Hook-Verteilung auf alle Repos (install-hooks.sh)
|
||||||
- [ ] Martin mit echten Tiles testen
|
- [ ] Martin mit Satellit-Daten testen
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue