Compare commits

..

No commits in common. "6a20e311f49897267a2b80738e26c71474828740" and "048805302dd7a75fd9aec0b6a54b34cc5d5a184e" have entirely different histories.

5 changed files with 51 additions and 139 deletions

View file

@ -6,6 +6,17 @@ 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/
@ -16,14 +27,17 @@ mbtiles:
# MapLibre GL Styles aus /data/styles/ servieren
# -> GET /styles/{id} (Style-JSON fuer MapLibre GL Clients)
styles:
- /data/styles
paths:
- /data/styles
# Sprites (Icons, Pins, Marker) aus /data/sprites/
# -> GET /sprites/{id}.json und /sprites/{id}.png
sprites:
- /data/sprites
paths:
- /data/sprites
# Schriftarten fuer Karten-Labels
# -> GET /fonts/{font_name}/{start}-{end}.pbf
# fonts:
# - /data/fonts
fonts:
paths:
- /data/fonts

View file

@ -1,13 +1,13 @@
services:
martin:
image: ghcr.io/maplibre/martin:latest
image: ghcr.io/maplibre/martin:v1.10.1
container_name: rd13_martin
ports:
- "9982:3000"
volumes:
- ./data:/data
- ./config/martin.yaml:/config/martin.yaml:ro
command: ["--config", "/config/martin.yaml", "--webui", "enable-for-all"]
command: ["--config", "/config/martin.yaml"]
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]

View file

@ -2,7 +2,6 @@
#
# 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
#
@ -13,14 +12,13 @@
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
# Die Namen entsprechen den Style-Dateien in data/styles/
$wgKartographerStyles = [
'osm-bright', # OpenStreetMap Vektorkarte (MapLibre GL)
'satellite-hybrid', # Satellitenkarte
'osm-bright', # OpenStreetMap Vektorkarte (MapLibre GL)
'satellite-hybrid', # Satellitenkarte
];
# Standard-Stil
@ -30,17 +28,11 @@ $wgKartographerSrcsetScales = [ 1, 1.5, 2 ];
# Tile-Endpunkte (Martin-Format):
# 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/
# Satellit: https://TILE_SERVER_URL/satellite/{z}/{x}/{y}
# Style-JSON: https://TILE_SERVER_URL/styles/osm-bright
# Beispiel-Verwendung in einem Wiki-Artikel:
# <maplink zoom="12" latitude="48.137" longitude="11.576">
# {"type":"Feature","geometry":{"type":"Point","coordinates":[11.576,48.137]},
# "properties":{"title":"Muenchen","description":"Landeshauptstadt"}}
# </maplink>
# Alternativ mit eingebetteter Karte:
#
<mapframe text="Muenchen" zoom="12" latitude="48.137" longitude="11.576" width="420" height="300" />
# {"type":"Feature","geometry":{"type":"Point","coordinates":[11.576,48.137]},
# "properties":{"title":"Muenchen","description":"Landeshauptstadt"}}
# </maplink>

View file

@ -1,100 +0,0 @@
# 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.
Ausgefuehrte Kommandos:
```bash
git add config/martin.yaml docker-compose.yml docs/mediawiki-config.php history/prompts/2026-06-10_tile-mediawiki-integration_session.md history/summary/PROJECT_CONTEXT.md
git commit -m "feat: enable martin webui and prep mediawiki integration"
git status --short
git show --name-only --oneline -1
git diff -- docs/mediawiki-config.php | sed -n '1,200p'
```
Relevante Outputs:
```text
[main 0a5f6cd] feat: enable martin webui and prep mediawiki integration
5 files changed, 114 insertions(+), 44 deletions(-)
M docs/mediawiki-config.php
```

View file

@ -1,6 +1,6 @@
# PROJECT_CONTEXT rd13_tile_server
**Letzte Aktualisierung:** 2026-06-10 Martin laeuft healthy, WebUI aktiv, MediaWiki-Integration vorbereitet
**Letzte Aktualisierung:** 2026-06-03 Planet-Download läuft, Martin konfiguriert
---
@ -13,7 +13,7 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt.
## Stack
- **Tile Server:** `ghcr.io/maplibre/martin:latest`
- **Tile Server:** `ghcr.io/maplibre/martin:v1.10.1`
- **Port:** 9982 extern → 3000 intern
- **Proxy:** NPM (Nginx Proxy Manager) extern kein nginx-Sidecar
- **Daten:** MBTiles/PMTiles in `/data/`
@ -24,37 +24,46 @@ Nextcloud, Home Assistant und andere Dienste Vektorkarten bereitstellt.
## Aktueller Zustand
### Laufende Services
- Martin-Container: **laeuft** und ist **healthy**
- WebUI: **aktiviert** ueber `--webui enable-for-all`
- Martin-Container: **noch nicht gestartet** (warte auf Download)
- Download `data/osm.mbtiles`: 🔄 ~67% (64/94 GB) läuft in tmux-Session `rd13-download`
### Vorhandene Daten in `/data/`
| Datei/Ordner | Status |
|---|---|
| `osm.mbtiles` | ✅ wird von Martin erkannt (Source `osm`) |
| `osm.mbtiles` | 🔄 Download läuft (~64 GB, fertig in ~30 Min) |
| `fonts/` | ✅ installiert |
| `styles/` | ✅ vorhanden |
| `satellite.mbtiles` | ❌ noch nicht heruntergeladen |
### Git-Stand
- Branch: `main`
- Letzter Commit: `0a5f6cd` - WebUI aktiviert und MediaWiki-Integration vorbereitet
- Noch offen (lokal): `docs/mediawiki-config.php`
- Letzter Commit: `df8518d` copilot-instructions aktualisiert
- Alle Änderungen gepusht
---
## Nächste Schritte (fuer naechsten Agenten)
## Nächste Schritte (für nächsten Agenten)
1. **MediaWiki-Repo anpassen und committen:**
- Kartographer-Block in LocalSettings auf tile server URL setzen
- Testseite mit `mapframe`/`maplink` anlegen
1. **Download prüfen:**
```bash
tail -3 logs/download-osm.log
ls -lh data/osm.mbtiles # sollte ~94 GB haben wenn fertig
```
2. **Satellit-Download starten** (optional, ~10 GB, Zoom 010):
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 010):
```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'
```
3. **NPM konfigurieren** (manuell im NPM UI):
4. **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;`
@ -81,16 +90,13 @@ 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
- [ ] MediaWiki-Repo umstellen und dort committen
- [ ] Download abwarten und Martin starten
- [ ] Satellit-Download (optional)
- [ ] NPM-Konfiguration (manuell)
- [ ] Hook-Verteilung auf alle Repos (install-hooks.sh)
- [ ] Martin mit Satellit-Daten testen
- [ ] Martin mit echten Tiles testen