#!/usr/bin/env bash
set -euo pipefail

HOST="${1:-ovh-vps}"
BASE_URL="${2:-https://www.portail-association973.com}"

echo "==> Conteneur OpenMapTiles sur ${HOST}"
ssh "${HOST}" 'docker ps --format "table {{.Names}}\t{{.Status}}" | grep -i openmaptiles || true'

echo
echo "==> Style serveur"
curl -I -L -s "${BASE_URL}/map-tiles/styles/OSM%20OpenMapTiles/style.json" | head -n 8

echo
echo "==> TileJSON"
curl -I -L -s "${BASE_URL}/data/openmaptiles.json" | head -n 8

echo
echo "==> Glyphes"
curl -I -L -s "${BASE_URL}/fonts/Open%20Sans%20Regular/0-255.pbf" | head -n 8

echo
echo "==> Style portail OSM Bright CCDS"
curl -I -L -s "${BASE_URL}/map-styles/openmaptiles-positron/style.json" | head -n 8
