On the docs site there are some environment variables which require a string containing JSON:
MB_APPLICATION_COLORS
MB_CUSTOM_FORMATTING
MB_CUSTOM_GEOJSON
MB_JWT_GROUP_MAPPINGS
MB_LDAP_GROUP_MAPPINGS
MB_SAML_GROUP_MAPPINGS
Could someone share an example on how to set these properly?
My problem may be specific to MB_CUSTOM_GEOJSON, but I can't seem to find a format for the value which will actually be read by Metabase. The results are all parsing errors. I've been trying to just set the default value to start with:
"{"us_states":{"name":"USA","url":"app/assets/geojson/us-states.json","region_key":"STATE","region_name":"NAME"},"world_countries":{"name":"World","url":"app/assets/geojson/world.json","region_key":"ISO_A2","region_name":"NAME"}}"
Things I've tried:
- The above as shown
- The above without the first and last double quotes
- The above with a single quote instead of the first and last double quotes
- Escaping the double quotes with a backslash, with and without first and last quotes
When I look at /proc/*/environ
for the Metabase process, the value is being set as specified. However I get either a parsing error at app startup like:
"type":"java.lang.ClassCastException","message":"class java.lang.String cannot be cast to class clojure.lang.IPersistentCollection (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')"
or the value is not actually set in Metabase (as shown by /api/setting
), rather it is "null". In this case Metabase can start up OK but the setting being null causes the /api/settings/maps
to show a blank white screen, with the JS console saying TypeError: can't convert null to object
.