From 75ee75f036aae87fdf0ac2608fef6dd4a7731457 Mon Sep 17 00:00:00 2001 From: Eric FELIXINE Date: Tue, 5 May 2026 21:12:32 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20MapStore=20=E2=86=94=20GeoServer=20inte?= =?UTF-8?q?gration=20+=20Pulsar=20Manager=20v0.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Connect GeoServer to smartcity-shared network (alias: geoserver) - Connect mapstore-app to smartcity-shared network - Add digitribe_wms/wmts/rest services in MapStore localConfig.json - Deploy Pulsar Manager with PostgreSQL backend + custom supervisord.conf - Fix Redpanda Traefik config (console instead of broker port) - Create mapstore/ docker-compose with volume mounts for persistence --- mapstore/config/nginx.conf | 42 + mapstore/configs/localConfig.json | 1453 ++++++++++++++++++++++++ mapstore/docker-compose.yml | 84 ++ pulsar/config/supervisord-manager.conf | 34 + pulsar/docker-compose.manager.yml | 57 +- session_resume_2026-05-07.md | 107 ++ 6 files changed, 1761 insertions(+), 16 deletions(-) create mode 100644 mapstore/config/nginx.conf create mode 100644 mapstore/configs/localConfig.json create mode 100644 mapstore/docker-compose.yml create mode 100644 pulsar/config/supervisord-manager.conf create mode 100644 session_resume_2026-05-07.md diff --git a/mapstore/config/nginx.conf b/mapstore/config/nginx.conf new file mode 100644 index 00000000..c79a9f76 --- /dev/null +++ b/mapstore/config/nginx.conf @@ -0,0 +1,42 @@ +server { + server_name mapstore.digitribe.fr; + + listen 80; + listen [::]:80; + + server_tokens off; + + root /usr/share/nginx/html; + + location / { + try_files $uri @mapstore; + } + + location /mapstore/ { + try_files $uri @mapstore; + } + + location /rest/geostore/ { + proxy_pass http://mapstore:8080/mapstore/rest/geostore/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /mapstore/rest/geostore/ { + proxy_pass http://mapstore:8080/mapstore/rest/geostore/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location @mapstore { + proxy_pass http://mapstore:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} diff --git a/mapstore/configs/localConfig.json b/mapstore/configs/localConfig.json new file mode 100644 index 00000000..92071151 --- /dev/null +++ b/mapstore/configs/localConfig.json @@ -0,0 +1,1453 @@ +{ + "proxyUrl": { + "url": "proxy/?url=", + "useCORS": [ + "http://demo.geo-solutions.it/geoserver", + "https://demo.geo-solutions.it:443/geoserver", + "https://demo.geo-solutions.it/geoserver", + "https://nominatim.openstreetmap.org", + "http://cloudsdi.geo-solutions.it", + "https://gs-stable.geo-solutions.it/geoserver", + "https://gs-stable.geo-solutions.it:443/geoserver", + "http://gs-stable.geo-solutions.it/geoserver", + "http://gs-stable.geo-solutions.it:443/geoserver", + "https://gs-stable.geosolutionsgroup.com/geoserver", + "https://gs-stable.geosolutionsgroup.com:443/geoserver", + "http://gs-stable.geosolutionsgroup.com/geoserver", + "http://gs-stable.geosolutionsgroup.com:443/geoserver", + "https://tile.googleapis.com", + "https://maps1.geosolutionsgroup.com/geoserver/", + "https://maps2.geosolutionsgroup.com/geoserver/", + "https://maps3.geosolutionsgroup.com/geoserver/", + "https://maps4.geosolutionsgroup.com/geoserver/", + "https://maps5.geosolutionsgroup.com/geoserver/" + ] + }, + "geoStoreUrl": "rest/geostore/", + "mailingList": "https://groups.google.com/forum/#!forum/mapstore-users", + "printUrl": "pdf/info.json", + "mapquestApiKey": "__API_KEY_MAPQUEST__", + "mapboxAccessToken": "__ACCESS_TOKEN_MAPBOX__", + "initialMapFilter": "", + "ignoreMobileCss": false, + "loadAfterTheme": true, + "defaultMapOptions": { + "cesium": { + "navigationTools": true, + "showSkyAtmosphere": true, + "showGroundAtmosphere": false, + "enableFog": false, + "depthTestAgainstTerrain": false, + "terrainProvider": { + "type": "ellipsoid" + }, + "zoomToExtentSettings": { + "minRadius": 10, + "fitFactor": 2.0, + "maxZoom": 20 + } + }, + "floatingIdentifyDelay": 1000 + }, + "localizedLayerStyles": { + "name": "mapstore_language" + }, + "requestsConfigurationRules": [ + { + "urlPattern": ".*rest/geostore.*", + "headers": { + "Authorization": "Bearer ${securityToken}" + } + }, + { + "urlPattern": ".*rest/config.*", + "headers": { + "Authorization": "Bearer ${securityToken}" + } + } + ], + "monitorState": [ + { + "name": "router", + "path": "router.location.pathname" + }, + { + "name": "browser", + "path": "browser" + }, + { + "name": "geostorymode", + "path": "geostory.mode" + }, + { + "name": "featuregridmode", + "path": "featuregrid.mode" + }, + { + "name": "userrole", + "path": "security.user.role" + }, + { + "name": "printEnabled", + "path": "print.capabilities" + }, + { + "name": "resourceCanEdit", + "path": "resources.initialSelectedResource.canEdit" + }, + { + "name": "resourceDetails", + "path": "resources.initialSelectedResource.attributes.details" + } + ], + "userSessions": { + "enabled": true + }, + "projectionDefs": [], + "initialState": { + "defaultState": { + "catalog": { + "default": { + "newService": { + "url": "", + "type": "wms", + "title": "", + "isNew": true, + "autoload": false + }, + "selectedService": "digitribe_wms", + "services": { + "gs_stable_csw": { + "url": "https://gs-stable.geo-solutions.it/geoserver/csw", + "type": "csw", + "title": "GeoSolutions GeoServer CSW", + "autoload": true + }, + "gs_stable_wms": { + "url": "https://gs-stable.geo-solutions.it/geoserver/wms", + "type": "wms", + "title": "GeoSolutions GeoServer WMS", + "autoload": false + }, + "gs_stable_wmts": { + "url": "https://gs-stable.geo-solutions.it/geoserver/gwc/service/wmts", + "type": "wmts", + "title": "GeoSolutions GeoServer WMTS", + "autoload": false + }, + "digitribe_wms": { + "url": "http://geoserver:8080/geoserver/wms", + "type": "wms", + "title": "GeoServer Martinique (WMS)", + "autoload": false + }, + "digitribe_wmts": { + "url": "http://geoserver:8080/geoserver/gwc/service/wmts", + "type": "wmts", + "title": "GeoServer Martinique (WMTS)", + "autoload": false + }, + "digitribe_rest": { + "url": "http://geoserver:8080/geoserver/rest", + "type": "rest", + "title": "GeoServer Martinique (REST)", + "autoload": false + } + }, + "staticServices": { + "default_map_backgrounds": { + "type": "backgrounds", + "title": "Default Backgrounds", + "titleMsgId": "defaultMapBackgroundsServiceTitle", + "autoload": true, + "backgrounds": [ + { + "format": "image/jpeg", + "group": "background", + "name": "osm:osm_simple_light", + "opacity": 1, + "title": "OSM Simple Light", + "thumbURL": "product/assets/img/osm-simple-light.jpg", + "type": "wms", + "url": [ + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms", + "https://maps6.geosolutionsgroup.com/geoserver/wms" + ], + "tileSize": 512, + "visibility": false, + "singleTile": false, + "credits": { + "title": "OSM Simple Light | Rendering GeoSolutions | Data \u00a9 OpenStreetMap contributors, ODbL" + } + }, + { + "format": "image/jpeg", + "group": "background", + "name": "osm:osm_simple_dark", + "opacity": 1, + "title": "OSM Simple Dark", + "thumbURL": "product/assets/img/osm-simple-dark.jpg", + "type": "wms", + "url": [ + "https://maps6.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms" + ], + "tileSize": 512, + "visibility": false, + "singleTile": false, + "credits": { + "title": "OSM Simple Dark | Rendering GeoSolutions | Data \u00a9 OpenStreetMap contributors, ODbL" + } + }, + { + "format": "image/jpeg", + "group": "background", + "name": "osm:osm", + "opacity": 1, + "title": "OSM Bright", + "thumbURL": "product/assets/img/osm-bright.jpg", + "type": "wms", + "url": [ + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms", + "https://maps6.geosolutionsgroup.com/geoserver/wms" + ], + "tileSize": 512, + "visibility": true, + "singleTile": false, + "credits": { + "title": "OSM Bright | Rendering GeoSolutions | Data \u00a9 OpenStreetMap contributors, ODbL" + } + }, + { + "format": "image/jpeg", + "group": "background", + "name": "ne:ne-political", + "opacity": 1, + "title": "NE Political", + "thumbURL": "product/assets/img/ne-political.jpg", + "type": "wms", + "url": [ + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms", + "https://maps6.geosolutionsgroup.com/geoserver/wms" + ], + "tileSize": 512, + "visibility": false, + "singleTile": false, + "credits": { + "title": "

\n" + } + }, + { + "format": "image/jpeg", + "group": "background", + "name": "s2cloudless:s2cloudless", + "opacity": 1, + "title": "Sentinel 2 Cloudless", + "type": "wms", + "url": [ + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms", + "https://maps6.geosolutionsgroup.com/geoserver/wms" + ], + "tileSize": 512, + "source": "s2cloudless", + "singleTile": false, + "visibility": false + }, + { + "type": "osm", + "title": "Open Street Map", + "name": "mapnik", + "source": "osm", + "group": "background", + "visibility": false + }, + { + "source": "ol", + "group": "background", + "title": "Empty Background", + "fixed": true, + "type": "empty", + "visibility": false + } + ] + } + } + } + }, + "locales": { + "supportedLocales": { + "it": { + "code": "it-IT", + "description": "Italiano" + }, + "en": { + "code": "en-US", + "description": "English" + }, + "fr": { + "code": "fr-FR", + "description": "Fran\u00e7ais" + }, + "de": { + "code": "de-DE", + "description": "Deutsch" + }, + "es": { + "code": "es-ES", + "description": "Espa\u00f1ol" + } + } + } + } + }, + "plugins": { + "mobile": [ + { + "name": "SecurityPopup" + }, + { + "name": "Map", + "cfg": { + "mapOptions": { + "openlayers": { + "interactions": { + "pinchRotate": false, + "altShiftDragRotate": false + } + } + } + } + }, + { + "name": "About", + "cfg": { + "githubUrl": "https://github.com/geosolutions-it/MapStore2/tree/" + } + }, + "DrawerMenu", + "BackgroundSelector", + { + "name": "Identify", + "showIn": [ + "Settings" + ], + "cfg": { + "showFullscreen": true, + "position": "bottom", + "disableInfoAlert": true, + "disableCoordinatesRow": true, + "size": 0.5, + "fluid": true, + "viewerOptions": { + "container": "{context.ReactSwipe}" + } + } + }, + { + "name": "Locate", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + "Home", + { + "name": "TOC", + "cfg": { + "activateMapTitle": false, + "activateSortLayer": false + } + }, + "AddGroup", + { + "name": "TOCItemsSettings", + "cfg": { + "width": 300 + } + }, + { + "name": "Tutorial", + "cfg": { + "preset": "default_mobile_tutorial" + } + }, + { + "name": "Settings", + "cfg": { + "wrap": true + } + }, + { + "name": "Search", + "cfg": { + "showOptions": false, + "withToggle": [ + "max-width: 768px", + "min-width: 768px" + ] + } + }, + { + "name": "Toolbar", + "id": "NavigationBar", + "cfg": { + "id": "navigationBar" + } + }, + "ZoomAll", + { + "name": "MapLoading", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "FullScreen", + "override": { + "Toolbar": { + "alwaysVisible": false + } + } + }, + "Login", + "OmniBar", + "BurgerMenu", + "Expander", + "GlobeViewSwitcher", + { + "name": "Cookie", + "cfg": { + "externalCookieUrl": "", + "declineUrl": "http://www.google.com" + } + }, + "FeedbackMask", + { + "name": "Widgets" + }, + { + "name": "WidgetsTray" + } + ], + "desktop": [ + "Details", + { + "name": "BrandNavbar", + "cfg": { + "containerPosition": "header" + } + }, + { + "name": "SecurityPopup" + }, + { + "name": "Map", + "cfg": { + "containerPosition": "background", + "mapOptions": { + "openlayers": { + "interactions": { + "pinchRotate": false, + "altShiftDragRotate": false + }, + "attribution": { + "container": "#footer-attribution-container" + } + }, + "leaflet": { + "attribution": { + "container": "#footer-attribution-container" + } + } + }, + "toolsOptions": { + "scalebar": { + "container": "#footer-scalebar-container" + } + } + } + }, + "AutoMapUpdate", + "HelpLink", + "DrawerMenu", + "Notifications", + "BackgroundSelector", + "Swipe", + { + "name": "Annotations" + }, + { + "name": "Share", + "cfg": { + "advancedSettings": { + "bbox": true, + "centerAndZoom": true + } + } + }, + "Permalink", + { + "name": "Identify", + "cfg": { + "showHighlightFeatureButton": true, + "viewerOptions": { + "container": "{context.ReactSwipe}" + }, + "showEdit": true + }, + "override": { + "Toolbar": { + "position": 11 + } + } + }, + { + "name": "Locate", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + "Home", + { + "name": "FeatureEditor", + "cfg": { + "containerPosition": "bottom" + } + }, + "LayerDownload", + { + "name": "QueryPanel", + "cfg": { + "activateQueryTool": true, + "spatialOperations": [ + { + "id": "INTERSECTS", + "name": "queryform.spatialfilter.operations.intersects" + }, + { + "id": "CONTAINS", + "name": "queryform.spatialfilter.operations.contains" + }, + { + "id": "WITHIN", + "name": "queryform.spatialfilter.operations.within" + } + ], + "spatialMethodOptions": [ + { + "id": "Viewport", + "name": "queryform.spatialfilter.methods.viewport" + }, + { + "id": "BBOX", + "name": "queryform.spatialfilter.methods.box" + }, + { + "id": "Circle", + "name": "queryform.spatialfilter.methods.circle" + }, + { + "id": "Polygon", + "name": "queryform.spatialfilter.methods.poly" + } + ] + } + }, + { + "name": "TOC", + "cfg": { + "layerOptions": { + "legendOptions": { + "WMSLegendOptions": "forceLabels:on", + "scaleDependent": true, + "legendWidth": 12, + "legendHeight": 12 + } + } + } + }, + "FilterLayer", + "AddGroup", + "TOCItemsSettings", + "Tutorial", + { + "name": "MapFooter", + "cfg": { + "containerPosition": "footer" + } + }, + { + "name": "Measure", + "cfg": { + "defaultOptions": { + "showAddAsAnnotation": true + } + } + }, + "Print", + "MapImport", + { + "name": "MapExport" + }, + { + "name": "Settings", + "cfg": { + "wrap": true + } + }, + { + "name": "MetadataExplorer", + "cfg": { + "wrap": true + } + }, + { + "name": "About", + "cfg": { + "githubUrl": "https://github.com/geosolutions-it/MapStore2/tree/" + } + }, + { + "name": "MousePosition", + "cfg": { + "editCRS": true, + "showLabels": true, + "showToggle": true, + "filterAllowedCRS": [ + "EPSG:4326", + "EPSG:3857" + ], + "additionalCRS": {} + } + }, + { + "name": "CRSSelector", + "cfg": { + "allowedRoles": [ + "ADMIN" + ], + "availableProjections": [ + { + "value": "EPSG:4326", + "label": "EPSG:4326" + }, + { + "value": "EPSG:3857", + "label": "EPSG:3857" + } + ] + } + }, + { + "name": "Search", + "cfg": { + "withToggle": [ + "max-width: 768px", + "min-width: 768px" + ] + } + }, + { + "name": "Toolbar", + "id": "NavigationBar", + "cfg": { + "id": "navigationBar" + } + }, + "ScaleBox", + { + "name": "ZoomAll", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "MapLoading", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "ZoomIn", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "ZoomOut", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "Cookie", + "cfg": { + "externalCookieUrl": "", + "declineUrl": "http://www.google.com" + } + }, + "OmniBar", + "Login", + { + "name": "ResourceDetails", + "cfg": { + "resourceType": "MAP" + } + }, + { + "name": "Save", + "cfg": { + "resourceType": "MAP" + } + }, + { + "name": "SaveAs", + "cfg": { + "resourceType": "MAP" + } + }, + { + "name": "DeleteResource", + "cfg": { + "resourceType": "MAP", + "redirectTo": "/" + } + }, + "Expander", + "Undo", + "Redo", + "FullScreen", + "GlobeViewSwitcher", + "SearchServicesConfig", + "SearchByBookmark", + "WidgetsBuilder", + { + "name": "Widgets" + }, + "WidgetsTray", + { + "name": "Timeline", + "cfg": { + "expandLimit": 20 + } + }, + "Playback", + "FeedbackMask", + "StyleEditor", + "SidebarMenu", + { + "name": "MapViews" + }, + { + "name": "Language" + } + ], + "embedded": [ + "Details", + { + "name": "Map", + "cfg": { + "mapOptions": { + "openlayers": { + "interactions": { + "pinchRotate": false, + "altShiftDragRotate": false + }, + "attribution": { + "container": "#footer-attribution-container" + } + }, + "leaflet": { + "attribution": { + "container": "#footer-attribution-container" + }, + "scrollWheelZoom": false, + "zoomControl": true + }, + "cesium": { + "attribution": { + "container": "#footer-attribution-container" + } + } + }, + "toolsOptions": { + "scalebar": { + "container": "#footer-scalebar-container" + } + } + } + }, + { + "name": "DrawerMenu", + "hide": "{!(request.query && request.query.forceDrawer)}" + }, + { + "name": "BackgroundSelector", + "cfg": { + "bottom": 40, + "dimensions": { + "side": 65, + "sidePreview": 65, + "frame": 3, + "margin": 5, + "label": false, + "vertical": true + } + } + }, + { + "name": "Identify", + "cfg": { + "showInMapPopup": true, + "viewerOptions": { + "container": "{context.ReactSwipe}" + } + } + }, + { + "name": "ZoomAll", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "Locate", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + { + "name": "FullScreen" + }, + { + "name": "TOC", + "cfg": { + "activateMapTitle": false, + "activateRemoveLayer": false, + "activateRemoveGroup": false + } + }, + "AddGroup", + "MapFooter", + { + "name": "Settings", + "cfg": { + "wrap": true + } + }, + { + "name": "Search", + "cfg": { + "showOptions": false, + "withToggle": true + } + }, + { + "name": "Toolbar", + "id": "NavigationBar", + "cfg": { + "id": "navigationBar" + } + }, + { + "name": "MapLoading", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + "Cookie", + "OmniBar", + { + "name": "GoFull", + "override": { + "Toolbar": { + "alwaysVisible": true + } + } + }, + "FeedbackMask" + ], + "common": [ + { + "name": "BrandNavbar" + }, + "Login", + "Language", + "ScrollTop", + "Notifications" + ], + "maps": [ + { + "name": "HomeDescription" + }, + { + "name": "ResourcesSearch" + }, + { + "name": "ResourcesGrid", + "cfg": { + "id": "featured", + "titleId": "manager.featuredMaps", + "pageSize": 4, + "cardLayoutStyle": "grid", + "order": null, + "hideWithNoResults": true, + "defaultQuery": { + "f": "featured" + } + } + }, + { + "name": "ResourcesGrid", + "cfg": { + "id": "catalog", + "titleId": "resources.contents.title", + "queryPage": true, + "menuItems": [ + { + "labelId": "resourcesCatalog.addResource", + "disableIf": "{!state('userrole')}", + "type": "dropdown", + "variant": "primary", + "size": "sm", + "responsive": true, + "noCaret": true, + "items": [ + { + "labelId": "resourcesCatalog.createMap", + "type": "link", + "href": "#/viewer/new", + "resourceType": "MAP" + }, + { + "labelId": "resourcesCatalog.createDashboard", + "type": "link", + "href": "#/dashboard/", + "resourceType": "DASHBOARD" + }, + { + "labelId": "resourcesCatalog.createGeoStory", + "type": "link", + "href": "#/geostory/newgeostory/", + "resourceType": "GEOSTORY" + }, + { + "labelId": "resourcesCatalog.createContext", + "type": "link", + "href": "#/context-creator/new", + "resourceType": "CONTEXT" + } + ] + } + ] + } + }, + { + "name": "Favorites" + }, + { + "name": "ResourcesFiltersForm", + "cfg": { + "resourcesGridId": "catalog" + } + }, + { + "name": "EditContext" + }, + { + "name": "DeleteResource" + }, + { + "name": "ResourceDetails", + "cfg": { + "enableFilters": true + } + }, + { + "name": "Share", + "cfg": { + "draggable": false, + "advancedSettings": false, + "showAPI": false, + "embedOptions": { + "showTOCToggle": false + }, + "map": { + "embedOptions": { + "showTOCToggle": true + } + }, + "geostory": { + "embedOptions": { + "showTOCToggle": false, + "allowFullScreen": false + }, + "shareUrlRegex": "(h[^#]*)#\\/geostory\\/([^\\/]*)\\/([A-Za-z0-9]*)", + "shareUrlReplaceString": "$1geostory-embedded.html#/$3", + "advancedSettings": { + "hideInTab": "embed", + "homeButton": true, + "sectionId": true + } + }, + "dashboard": { + "shareUrlRegex": "(h[^#]*)#\\/dashboard\\/([A-Za-z0-9]*)", + "shareUrlReplaceString": "$1dashboard-embedded.html#/$2", + "embedOptions": { + "showTOCToggle": false, + "showConnectionsParamToggle": true + } + } + } + }, + { + "name": "Footer" + }, + { + "name": "About" + }, + { + "name": "Cookie", + "cfg": { + "externalCookieUrl": "", + "declineUrl": "http://www.google.com" + } + } + ], + "permalink": [ + "Permalink", + "FeedbackMask" + ], + "dashboard": [ + { + "name": "LayerDownload", + "cfg": { + "cropDataSetVisible": false + } + }, + { + "name": "ResourceDetails", + "cfg": { + "resourceType": "DASHBOARD" + } + }, + { + "name": "Save", + "cfg": { + "resourceType": "DASHBOARD" + } + }, + { + "name": "SaveAs", + "cfg": { + "resourceType": "DASHBOARD" + } + }, + "Details", + { + "name": "SecurityPopup" + }, + "AddWidgetDashboard", + "MapConnectionDashboard", + { + "name": "SidebarMenu", + "cfg": { + "containerPosition": "columns" + } + }, + { + "name": "Dashboard" + }, + "Notifications", + { + "name": "MapEditor", + "cfg": { + "titleMsgId": "widgets.mapWidget.mapEditorTitle", + "overrideDefaultPlugins": [ + { + "name": "FeatureEditor", + "cfg": { + "containerPosition": "bottom" + } + } + ] + } + }, + { + "name": "About", + "cfg": { + "githubUrl": "https://github.com/geosolutions-it/MapStore2/tree/" + } + }, + "Language", + { + "name": "Home", + "override": { + "OmniBar": { + "priority": 5 + } + } + }, + { + "name": "Login", + "override": { + "OmniBar": { + "priority": 5 + } + } + }, + { + "name": "DeleteResource", + "cfg": { + "resourceType": "DASHBOARD", + "redirectTo": "/" + } + }, + { + "name": "DashboardExport" + }, + { + "name": "DashboardImport" + }, + { + "name": "BrandNavbar", + "cfg": { + "containerPosition": "header" + } + }, + { + "name": "Share", + "cfg": { + "showAPI": false, + "advancedSettings": false, + "shareUrlRegex": "(h[^#]*)#\\/dashboard\\/([A-Za-z0-9]*)", + "shareUrlReplaceString": "$1dashboard-embedded.html#/$2", + "embedOptions": { + "showTOCToggle": false, + "showConnectionsParamToggle": true, + "allowFullScreen": false, + "sizeOptions": { + "Small": { + "width": 600, + "height": 500 + }, + "Medium": { + "width": 800, + "height": 600 + }, + "Large": { + "width": 1000, + "height": 800 + }, + "Custom": { + "width": 0, + "height": 0 + } + }, + "selectedOption": "Small" + } + } + }, + "Permalink", + { + "name": "DashboardEditor", + "cfg": { + "selectedService": "GeoSolutions GeoServer CSW", + "services": { + "GeoSolutions GeoServer CSW": { + "url": "https://gs-stable.geo-solutions.it/geoserver/csw", + "type": "csw", + "title": "GeoSolutions GeoServer CSW" + }, + "GeoSolutions GeoServer WMS": { + "url": "https://gs-stable.geo-solutions.it/geoserver/wms", + "type": "wms", + "title": "GeoSolutions GeoServer WMS" + }, + "GeoSolutions GeoServer WMTS": { + "url": "https://gs-stable.geo-solutions.it/geoserver/gwc/service/wmts", + "type": "wmts", + "title": "GeoSolutions GeoServer WMTS" + } + }, + "containerPosition": "columns" + } + }, + { + "name": "QueryPanel", + "cfg": { + "toolsOptions": { + "hideCrossLayer": true, + "useEmbeddedMap": true + }, + "spatialPanelExpanded": false, + "spatialOperations": [ + { + "id": "INTERSECTS", + "name": "queryform.spatialfilter.operations.intersects" + }, + { + "id": "CONTAINS", + "name": "queryform.spatialfilter.operations.contains" + }, + { + "id": "WITHIN", + "name": "queryform.spatialfilter.operations.within" + } + ], + "spatialMethodOptions": [ + { + "id": "BBOX", + "name": "queryform.spatialfilter.methods.box" + }, + { + "id": "Circle", + "name": "queryform.spatialfilter.methods.circle" + }, + { + "id": "Polygon", + "name": "queryform.spatialfilter.methods.poly" + } + ], + "containerPosition": "columns" + } + }, + { + "name": "Tutorial", + "cfg": { + "allowClicksThruHole": false, + "containerPosition": "header", + "preset": "dashboard_tutorial" + } + }, + { + "name": "FeedbackMask", + "cfg": { + "containerPosition": "header" + } + } + ], + "geostory-embedded": [ + "GeoStory", + { + "name": "SecurityPopup" + }, + { + "name": "GeoStoryNavigation", + "cfg": { + "containerPosition": "header" + } + }, + { + "name": "FeedbackMask", + "cfg": { + "containerPosition": "header" + } + } + ], + "dashboard-embedded": [ + { + "name": "Dashboard", + "cfg": { + "minLayoutWidth": 768 + } + }, + { + "name": "SecurityPopup" + }, + { + "name": "FeedbackMask" + } + ], + "geostory": [ + { + "name": "SecurityPopup" + }, + { + "name": "ResourceDetails", + "cfg": { + "containerPosition": "columns", + "resourceType": "GEOSTORY" + } + }, + { + "name": "Save", + "cfg": { + "resourceType": "GEOSTORY" + } + }, + { + "name": "SaveAs", + "cfg": { + "resourceType": "GEOSTORY" + } + }, + { + "name": "BrandNavbar", + "cfg": { + "containerPosition": "header", + "disablePluginIf": "{(state('router') && state('router').includes('/geostory/shared') && state('geostorymode') !== 'edit')}" + } + }, + { + "name": "Tutorial", + "cfg": { + "allowClicksThruHole": false, + "containerPosition": "header", + "preset": "geostory_view_tutorial" + } + }, + "Login", + "BurgerMenu", + { + "name": "About", + "cfg": { + "githubUrl": "https://github.com/geosolutions-it/MapStore2/tree/" + } + }, + "Language", + "Home", + { + "name": "GeoStory" + }, + { + "name": "DeleteResource", + "cfg": { + "resourceType": "GEOSTORY", + "redirectTo": "/" + } + }, + { + "name": "GeoStoryExport" + }, + { + "name": "GeoStoryImport" + }, + "MapEditor", + "MediaEditor", + { + "name": "GeoStoryEditor", + "cfg": { + "disablePluginIf": "{!!(state('browser') && state('browser').mobile)}", + "containerPosition": "columns" + } + }, + { + "name": "GeoStoryNavigation", + "cfg": { + "containerPosition": "header" + } + }, + "Notifications", + { + "name": "FeedbackMask", + "cfg": { + "containerPosition": "header" + } + }, + { + "name": "Share", + "cfg": { + "embedPanel": true, + "showAPI": false, + "embedOptions": { + "showTOCToggle": false, + "allowFullScreen": false + }, + "shareUrlRegex": "(h[^#]*)#\\/geostory\\/([^\\/]*)\\/([A-Za-z0-9]*)", + "shareUrlReplaceString": "$1geostory-embedded.html#/$3", + "advancedSettings": { + "hideInTab": "embed", + "homeButton": true, + "sectionId": true + } + } + }, + "Permalink" + ], + "context-creator": [ + { + "name": "BrandNavbar", + "cfg": { + "containerPosition": "header" + } + }, + { + "name": "About" + }, + "Redirect", + "Login", + "Language", + "Tutorial", + { + "name": "ContextCreator", + "cfg": { + "documentationBaseURL": "https://mapstore.geosolutionsgroup.com/mapstore/docs/api/plugins", + "backToPageDestRoute": "/", + "backToPageConfirmationMessage": "contextCreator.undo" + } + }, + "ContextImport", + "ContextExport", + "Notifications", + { + "name": "FeedbackMask", + "cfg": { + "containerPosition": "header" + } + } + ], + "manager": [ + "Redirect", + "Manager", + "Home", + "UserManager", + "GroupManager", + "TagsManager", + "IPManager", + "Footer", + { + "name": "About" + } + ] + } +} \ No newline at end of file diff --git a/mapstore/docker-compose.yml b/mapstore/docker-compose.yml new file mode 100644 index 00000000..5d799fa2 --- /dev/null +++ b/mapstore/docker-compose.yml @@ -0,0 +1,84 @@ +# MapStore2 - Smart City Digital Twin Martinique +# GeoServer local: http://geoserver:8080/geoserver +# Accès: https://mapstore.digitribe.fr +version: '3.8' + +services: + mapstore-postgres: + image: geosolutions-mapstore/postgis:14 + container_name: mapstore-postgres + restart: unless-stopped + environment: + POSTGRES_USER: mapstore + POSTGRES_PASSWORD: mapstore + POSTGRES_DB: mapstore + volumes: + - mapstore2_pg_data:/var/lib/postgresql/data + networks: + - mapstore-network + - smartcity-shared + - traefik-public + healthcheck: + test: ["CMD-SHELL", "pg_isready -U mapstore"] + interval: 10s + timeout: 5s + retries: 5 + + mapstore-app: + image: geosolutionsit/mapstore2:latest + container_name: mapstore-app + restart: unless-stopped + depends_on: + mapstore-postgres: + condition: service_healthy + environment: + MAPSTORE_BACKEND_PORT: 8080 + JAVA_OPTS: "-Xms512m -Xmx2g" + volumes: + # Configuration persistante - GeoServer local + - ./configs/localConfig.json:/usr/local/tomcat/webapps/mapstore/configs/localConfig.json:ro + networks: + - mapstore-network + - smartcity-shared + ports: + - "8082:8080" + healthcheck: + test: ["CMD-SHELL", "curl -s http://localhost:8080/ || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + + mapstore-proxy: + image: nginx:alpine + container_name: mapstore-proxy + restart: unless-stopped + depends_on: + - mapstore-app + volumes: + # Configuration nginx persistante + - ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro + networks: + - mapstore-network + - smartcity-shared + - traefik-public + ports: + - "80:80" + labels: + - "traefik.enable=true" + - "traefik.http.routers.mapstore.rule=Host(`mapstore.digitribe.fr`)" + - "traefik.http.routers.mapstore.entrypoints=websecure" + - "traefik.http.routers.mapstore.tls=true" + - "traefik.http.services.mapstore.loadbalancer.server.port=80" + +networks: + mapstore-network: + name: mapstore2_mapstore-network + driver: bridge + smartcity-shared: + external: true + traefik-public: + external: true + +volumes: + mapstore2_pg_data: + external: true diff --git a/pulsar/config/supervisord-manager.conf b/pulsar/config/supervisord-manager.conf new file mode 100644 index 00000000..5acd8885 --- /dev/null +++ b/pulsar/config/supervisord-manager.conf @@ -0,0 +1,34 @@ +[supervisord] +nodaemon=true +logfile=/tmp/supervisord.log +logfile_maxbytes=50MB +logfile_backups=10 +pidfile=/tmp/supervisord.pid + +[program:pulsar-manager-frontend] +command=sh -c "cd /pulsar-manager/pulsar-manager/ui && npm start" +autostart=true +autorestart=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:pulsar-manager-backend] +command=/pulsar-manager/pulsar-manager/bin/pulsar-manager \ + --redirect.host=%(ENV_REDIRECT_HOST)s \ + --redirect.port=%(ENV_REDIRECT_PORT)s \ + --spring.datasource.driver-class-name=%(ENV_DRIVER_CLASS_NAME)s \ + --spring.datasource.url=%(ENV_URL)s \ + --spring.datasource.username=%(ENV_USERNAME)s \ + --spring.datasource.password=%(ENV_PASSWORD)s \ + --spring.datasource.initialization-mode=%(ENV_INITIALIZATION_MODE)s \ + --logging.level.org.apache=%(ENV_LOG_LEVEL)s +environment=ENV_REDIRECT_HOST="%(ENV_REDIRECT_HOST)s",ENV_REDIRECT_PORT="%(ENV_REDIRECT_PORT)s",ENV_DRIVER_CLASS_NAME="%(ENV_DRIVER_CLASS_NAME)s",ENV_URL="%(ENV_URL)s",ENV_USERNAME="%(ENV_USERNAME)s",ENV_PASSWORD="%(ENV_PASSWORD)s",ENV_INITIALIZATION_MODE="%(ENV_INITIALIZATION_MODE)s",ENV_LOG_LEVEL="%(ENV_LOG_LEVEL)s" +user=root +autostart=true +autorestart=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 diff --git a/pulsar/docker-compose.manager.yml b/pulsar/docker-compose.manager.yml index e894a2e2..fce24e31 100644 --- a/pulsar/docker-compose.manager.yml +++ b/pulsar/docker-compose.manager.yml @@ -1,27 +1,51 @@ -# Pulsar Manager - Web UI for managing Pulsar -# Access: https://pulsar.digitribe.fr -version: '3.8' - +# Pulsar Manager - Web UI pour Apache Pulsar Standalone +# Accès: https://pulsar.digitribe.fr services: + pulsar-manager-db: + image: postgres:15-alpine + container_name: smart-city-pulsar-manager-db + restart: unless-stopped + environment: + POSTGRES_USER: superset + POSTGRES_PASSWORD: Digitribe972 + POSTGRES_DB: pulsar_manager + volumes: + - pulsar-manager-db-data:/var/lib/postgresql/data + networks: + - pulsar-manager-net + healthcheck: + test: ["CMD-SHELL", "pg_isready -U superset"] + interval: 10s + timeout: 5s + retries: 5 + pulsar-manager: - image: apachepulsar/pulsar-manager:v0.4.0 + image: apachepulsar/pulsar-manager:v0.2.0 container_name: smart-city-pulsar-manager restart: unless-stopped depends_on: - pulsar: + pulsar-manager-db: condition: service_healthy environment: - - PULSAR_CLUSTER_NAME=standalone - - PULSAR_SERVICE_URL=pulsar://smart-city-pulsar:6650 - - PULSAR_WEB_SERVICE_URL=http://smart-city-pulsar:8080 - - SPRING_APPLICATION_JSON={"server":{"port":7750},"pulsar":{"cluster":"standalone","serviceUrl":"pulsar://smart-city-pulsar:6650","webServiceUrl":"http://smart-city-pulsar:8080"}} + # Variables mappées par supervisord.conf custom + REDIRECT_HOST: pulsar.digitribe.fr + REDIRECT_PORT: "443" + DRIVER_CLASS_NAME: org.postgresql.Driver + URL: jdbc:postgresql://pulsar-manager-db:5432/pulsar_manager + USERNAME: superset + PASSWORD: Digitribe972 + INITIALIZATION_MODE: embedded + LOG_LEVEL: INFO + volumes: + - ./config/supervisord-manager.conf:/etc/supervisord.conf:ro networks: + - pulsar-manager-net - traefik-public - smartcity-shared ports: - "7750:7750" healthcheck: - test: ["CMD-SHELL", "curl -sf http://localhost:7750 || exit 1"] + test: ["CMD-SHELL", "wget -qO- http://localhost:7750 || exit 1"] interval: 30s timeout: 10s retries: 5 @@ -32,14 +56,15 @@ services: - "traefik.http.routers.pulsar-manager.entrypoints=websecure" - "traefik.http.routers.pulsar-manager.tls=true" - "traefik.http.services.pulsar-manager.loadbalancer.server.port=7750" - # Redirect /admin and /ws to Pulsar standalone - - "traefik.http.routers.pulsar.rule=Host(`pulsar.digitribe.fr`) && PathPrefix(`/admin`, `/ws`, `/lookup`)" - - "traefik.http.routers.pulsar.entrypoints=websecure" - - "traefik.http.routers.pulsar.tls=true" - - "traefik.http.services.pulsar.loadbalancer.server.port=8080" networks: + pulsar-manager-net: + name: pulsar-manager-net + driver: bridge traefik-public: external: true smartcity-shared: external: true + +volumes: + pulsar-manager-db-data: diff --git a/session_resume_2026-05-07.md b/session_resume_2026-05-07.md new file mode 100644 index 00000000..39025171 --- /dev/null +++ b/session_resume_2026-05-07.md @@ -0,0 +1,107 @@ +# Session Resume - 2026-05-07 + +## Objectif +Reprise après crash + configuration MapStore ↔ GeoServer. + +--- + +## Actions effectuées + +### ThingsBoard — supprimé +- `docker-kafka-1` + `docker-tb-js-executor-1` supprimés (Eric : "ThingsBoard ne fait pas du projet") + +### Redpanda Console — corrigé ✅ +- `22-redpanda.yml` pointait vers `smart-city-redpanda:9644` (broker Kafka) → corrigé vers `smart-city-redpanda-console:8080` +- `https://redpanda.digitribe.fr` → **200 OK** (cert auto-signé, normal) + +### Pulsar Manager — déployé ✅ +- Créé `pulsar/docker-compose.manager.yml` (PostgreSQL 15 + Pulsar Manager v0.2.0) +- Créé `pulsar/config/supervisord-manager.conf` (fix variables manquantes) +- Backend Spring Tomcat démarré sur port 7750 → **200 OK** +- Accessible via : https://pulsar.digitribe.fr +- API REST: `http://localhost:7750/pulsar-manager` +- **Route Traefik NON encore créée** → `https://pulsar.digitribe.fr` → 404 (nécessite fix 21-pulsar.yml) + +### MapStore ↔ GeoServer — configuré ✅ +**Problème résolu :** mapstore-app ne pouvait pas joindre GeoServer (réseaux Docker séparés). + +**Solution appliquée :** +1. GeoServer (`geoserver_stack-geoserver-1`) → connecté au réseau `smartcity-shared` avec alias `geoserver` +2. mapstore-app → connecté au réseau `smartcity-shared` +3. mapstore-proxy → déjà sur `smartcity-shared` + +**Services GeoServer ajoutés dans MapStore `localConfig.json` :** +- `digitribe_wms` → `http://geoserver:8080/geoserver/wms` (WMS) +- `digitribe_wmts` → `http://geoserver:8080/geoserver/gwc/service/wmts` (WMTS) +- `digitribe_rest` → `http://geoserver:8080/geoserver/rest` (REST API) + +**Connectivité vérifiée :** +``` +mapstore-app → http://geoserver:8080/geoserver/wms → ✅ GetCapabilities répondu +Couches disponibles: Spearfish, Tasmania, GeoServer Web Map Service, etc. +``` + +**Fichiers persistants créés :** +- `mapstore/docker-compose.yml` — compose complet avec volumes mounts +- `mapstore/configs/localConfig.json` — config avec GeoServer local (mounté en volume) +- `mapstore/config/nginx.conf` — config nginx du proxy MapStore + +--- + +## Action restante + +### Pulsar Manager — route Traefik manquante +``` +# Supprimer l'ancienne config et remplacer par : +cat > /home/eric/traefik-config/dynamic/21-pulsar.yml << 'EOF' +http: + routers: + pulsar-manager: + rule: "Host(`pulsar.digitribe.fr`)" + entryPoints: + - websecure + tls: true + service: pulsar-manager-svc + services: + pulsar-manager-svc: + loadBalancer: + servers: + - url: "http://smart-city-pulsar-manager:7750" +EOF +docker restart traefik +# puis tester: curl -sk -o /dev/null -w "%{http_code}" https://pulsar.digitribe.fr/ +``` + +--- + +## État des services + +| Service | URL | Status | +|---------|-----|--------| +| **MapStore** | https://mapstore.digitribe.fr | ✅ 200 | +| **GeoServer** (via MapStore) | http://geoserver:8080/geoserver | ✅ WMS/WMTS/REST | +| **Redpanda Console** | https://redpanda.digitribe.fr | ✅ 200 | +| **Pulsar standalone** | localhost:6650 | ✅ | +| **Pulsar Manager** | https://pulsar.digitribe.fr | ⚠️ Route Traefik à corriger | +| **InfluxDB** | http://localhost:8086 | ✅ 204 | +| **FROST-Server** | http://localhost:8090 | ✅ 200 | +| **Stellio** | https://stellio.digitribe.fr | ✅ 200 | +| **Orion-LD** | localhost:2026 | ✅ | + +--- + +## Docker networks (connectivité) + +``` +smartcity-shared (shared network) + ├── mapstore-app ✅ + ├── mapstore-proxy ✅ + ├── mapstore-postgres ✅ + ├── geoserver_stack-geoserver-1 ✅ (alias: geoserver) + └── many other services... + +traefik-public + ├── mapstore-proxy ✅ + ├── geoserver_stack-geoserver-1 ✅ + └── traefik ✅ +```