#!/bin/bash
# Configuration GeoServer - Smart City Digital Twin
# À exécuter avec : bash geoserver-config.sh
# Nécessite : admin/Digitribe972
GEOSERVER="https://geoserver.digitribe.fr/geoserver"
USER="admin"
PASS="Digitribe972"
echo "🗺️ Configuration GeoServer pour Smart City..."
# 1. Workspace smartcity
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces" \
-H "Content-type: text/xml" \
-d 'smartcity'
# 2. FROST PostgreSQL (SensorThings)
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces/smartcity/datastores" \
-H "Content-type: text/xml" \
-d '
frost-sensorthings
0cd2213a58ad
5432
sensorthings
sensorthings
Digitribe972
postgis
'
# 3. Stellio PostgreSQL + TimescaleDB
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces/smartcity/datastores" \
-H "Content-type: text/xml" \
-d '
stellio-timescale
9e24c6771977
5432
stellio
stellio
Digitribe972
postgis
'
# 4. MapStore PostGIS
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces/smartcity/datastores" \
-H "Content-type: text/xml" \
-d '
mapstore-postgis
67804b3a308f
5432
mapstore
mapstore
Digitribe972
postgis
'
# 5. Orion-LD MongoDB (nécessite extension MongoDB)
echo "⚠️ Pour Orion-LD (MongoDB), installer l'extension MongoDB dans GeoServer"
echo "✅ Configuration terminée ! Vérifie dans l'UI GeoServer."