Custom mapdata.mbtiles not found (Windows host)

Hello

I’m new to openremote and I’m currently trying to display my own map instead of the custom Rotterdam map (on https://localhost).

My main sources of information so far were the GitHub tutorial and the OpenRemote YouTube " How to: white labeling of your free open source IoT platform" tutorial.

Reviewing the openremote-manager-1 logs, it seems clear that the mapdata.mbtiles file can not be located and is therefore not displayed. The same is true for the mapsettings.json file, though the logs show a slightly different path (deployment.local vs deployment).

2023-03-23 15:28:51 2023-03-23 15:28:51.310  WARNING [main] org.openremote.manager.map.MapService: Map tiles data file not found '/deployment.local/mapdata/mapdata.mbtiles', falling back to built in map
2023-03-23 15:28:51 2023-03-23 15:28:51.311  WARNING [main] org.openremote.manager.map.MapService: Map settings file not found '/deployment/map/mapsettings.json', falling back to built in map settings

Folder structure:

C:.
│   docker-compose.yml
│   or.txt
│
├───deployment
│   │   openremote.log.0
│   │
│   ├───manager
│   │   │   keycloak.json
│   │   │
│   │   └───app
│   │       │   manager_config.json
│   │       │
│   │       └───images
│   │               img.ico
│   │               img.png
│   │
│   └───map
│           mapdata.mbtiles
│           maptsettings.json
│
└───info
        manager_rm.txt
        mapdata_cropped.mbtiles
        map_rm.txt

I assume the issue lies in the docker-compose.yml file, specifically the MAP_TILES_PATH and MAP_SETTINGS_PATH environment variables and the manager volumes.

docker-compose.yml:

version: '2.4'

volumes:
  proxy-data:
  manager-data:
  postgresql-data:

services:

  proxy:
    image: openremote/proxy:${PROXY_VERSION:-latest}
    restart: always
    depends_on:
      manager:
        condition: service_healthy
    ports:
      - "80:80"
      - "${OR_SSL_PORT:-443}:443"
      - "8883:8883"
    volumes:
      - proxy-data:/deployment
    environment:
      LE_EMAIL: ${OR_EMAIL_ADMIN:-}
      DOMAINNAME: ${OR_HOSTNAME:-localhost}
      DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      # USE A CUSTOM PROXY CONFIG - COPY FROM https://raw.githubusercontent.com/openremote/proxy/main/haproxy.cfg
      # HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'

  postgresql:
    restart: always
    image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
    volumes:
      - postgresql-data:/var/lib/postgresql/data
      - manager-data:/storage

  keycloak:
    restart: always
    image: openremote/keycloak:${KEYCLOAK_VERSION:-latest}
    depends_on:
      postgresql:
        condition: service_healthy
    volumes:
      - ./deployment:/deployment
    environment:
      KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
      KC_HOSTNAME: ${OR_HOSTNAME:-localhost}
      KC_HOSTNAME_PORT: ${OR_SSL_PORT:--1}


  manager:
    # privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST:
      OR_EMAIL_USER:
      OR_EMAIL_PASSWORD:
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM:
      OR_EMAIL_ADMIN:
      OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:--1}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}

      # The following variables will configure the demo
      OR_FORECAST_SOLAR_API_KEY:
      OR_OPEN_WEATHER_API_APP_ID:
      OR_SETUP_IMPORT_DEMO_AGENT_KNX:
      OR_SETUP_IMPORT_DEMO_AGENT_VELBUS:
      MAP_TILES_PATH: ../deployment/map/mapdata.mbtiles # unsure about the path, doesn't seem to matter what I put in here
      MAP_SETTINGS_PATH: ../deployment/map/mapsettings.json # same
    volumes:
      - manager-data:/storage
      - ./deployment:/deployment # If I don't comment this line out, then I just encounter a fully white page (also no menu) after the login prompt

Also, could someone explain conceptually what “- ./deployment:/deployment” is supposed to do? Is this a volume and I have to define it somewhere before using it? How come keycloack is using the same “storage thingy”?

Help is greatly appreciated :slight_smile:

Kind regards,
L

1 Like

Hi @leoy
Try removing those 2 Paths, my instances are working just with the mbtiles + the mapsettings.json

Hello @pcr

Many thanks for your reply. There were actually three different issues.

1) docker-compose.yml

I checked the file structure of the docker container (“docker desktop” => “openremote-manager-1” => “files”) and realized the current directory was “opt/app”, so I changed the environment variables accordingly (it seems the GitHub tutorial is a bit out-of-date here).

  manager:
    # privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST:
      OR_EMAIL_USER:
      OR_EMAIL_PASSWORD:
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM:
      OR_EMAIL_ADMIN:
      OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:--1}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}

      # The following variables will configure the demo
      OR_FORECAST_SOLAR_API_KEY:
      OR_OPEN_WEATHER_API_APP_ID:
      OR_SETUP_IMPORT_DEMO_AGENT_KNX:
      OR_SETUP_IMPORT_DEMO_AGENT_VELBUS:
      => OR_MAP_TILES_PATH: ../../deployment/map/mapdata.mbtiles
      => OR_MAP_SETTINGS_PATH: ../../deployment/map/mapsettings.json
    volumes:
      - manager-data:/storage
      - ./deployment:/deployment

2)

maptsettings.json should have been mapsettings.json

3)

The opening curly bracket was missing in the manager_config.json file, so the page didn’t display. I only realized this when I checked the “white page” via the (Chrome) developer tools console.

So all is well for now :slight_smile: