DSM-Aufgabenplaner kann minimal stuendlich (Rene) — Container laeuft jetzt dauerhaft (restart: unless-stopped) mit interner Schleife (loop.sh, idle = sh+sleep, Python/GDAL nur waehrend des Laufs). Einmal 'up -d --build', ueberlebt Reboots. make_radar_tiles.py ist idempotent, Fehler brechen die Schleife nicht.
19 lines
902 B
Docker
19 lines
902 B
Docker
# DWD-Regenradar-Pipeline: GDAL (decode/warp/tile) + go-pmtiles (MBTiles → PMTiles)
|
|
FROM ghcr.io/osgeo/gdal:alpine-normal-latest
|
|
|
|
# go-pmtiles-CLI (statisches Binary)
|
|
ARG PMTILES_VERSION=1.22.1
|
|
ARG TARGETARCH
|
|
RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo x86_64) && \
|
|
wget -qO /tmp/pmtiles.tar.gz \
|
|
"https://github.com/protomaps/go-pmtiles/releases/download/v${PMTILES_VERSION}/go-pmtiles_${PMTILES_VERSION}_Linux_${ARCH}.tar.gz" && \
|
|
tar xzf /tmp/pmtiles.tar.gz -C /usr/local/bin pmtiles && \
|
|
rm /tmp/pmtiles.tar.gz && pmtiles version || true
|
|
|
|
COPY make_radar_tiles.py /app/make_radar_tiles.py
|
|
COPY loop.sh /app/loop.sh
|
|
RUN chmod +x /app/loop.sh
|
|
WORKDIR /app
|
|
# Dauerbetrieb mit interner 5-Min-Schleife (DSM-Aufgabenplaner kann nur stündlich).
|
|
# Einmal-Lauf weiterhin möglich: docker compose run --rm dwd-radar python3 /app/make_radar_tiles.py
|
|
CMD ["/app/loop.sh"]
|