100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Improve robustness of MapService.java and minor update to dev-testing.yml profile to allow passing in KEYCLOAK_FRONTEND_URL
Rich Turner87750b0a50e8
diff --git a/manager/src/main/java/org/openremote/manager/map/MapService.java b/manager/src/main/java/org/openremote/manager/map/MapService.javaindex 7b4b3acbd..9da21b810 100644--- a/manager/src/main/java/org/openremote/manager/map/MapService.java+++ b/manager/src/main/java/org/openremote/manager/map/MapService.java@@ -168,11 +168,19 @@ public class MapService implements ContainerService {// }if (mapTilesPath == null) {- mapTilesPath = Paths.get("/opt/map/mapdata.mbtiles");+ if (Files.isRegularFile(Paths.get("/opt/map/mapdata.mbtiles"))) {+ mapTilesPath = Paths.get("/opt/map/mapdata.mbtiles");+ } else if (Files.isRegularFile(Paths.get("manager/src/map/mapdata.mbtiles"))) {+ mapTilesPath = Paths.get("manager/src/map/mapdata.mbtiles");+ }}if (mapSettingsPath == null) {- mapSettingsPath = Paths.get("/opt/map/mapsettings.json");+ if (Files.isRegularFile(Paths.get("/opt/map/mapsettings.json"))) {+ mapSettingsPath = Paths.get("/opt/map/mapsettings.json");+ } else if (Files.isRegularFile(Paths.get("manager/src/map/mapsettings.json"))) {+ mapSettingsPath = Paths.get("manager/src/map/mapsettings.json");+ }}container.getService(ManagerWebService.class).getApiSingletons().add(diff --git a/profile/dev-testing.yml b/profile/dev-testing.ymlindex 4b8c23fff..d32b67bed 100644--- a/profile/dev-testing.yml+++ b/profile/dev-testing.yml@@ -24,7 +24,7 @@ services:condition: service_healthyenvironment:# Use manager dev mode reverse proxy to access keycloak so manager and keycloak hosts match- KEYCLOAK_FRONTEND_URL: 'http://localhost:8080/auth'+ KEYCLOAK_FRONTEND_URL: ${KEYCLOAK_FRONTEND_URL:-http://localhost:8080/auth}postgresql:extends: