Custom AppSettings example: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
Jeb (talk | contribs)
No edit summary
Jeb (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This is an example file showing how to override the ports and paths used by MariaServiceHoster, plus a few other settings. Save it as  
This is an example file that shows how to override the ports and paths used by MariaServiceHoster, plus a few other settings. Save it as <code>appSettings.local.json</code> in the same folder as <code>appSettings.json</code> (the default location is <code>%ProgramData%\TeleplanGlobe\MariaServiceHoster</code>).


  {
  <nowiki>
  // In GlobalDefinitions one can override the values defined in
{
  // appSettings.json or add new ones that can be referenced by other
  // In GlobalDefinitions one can override the values defined in
  // values in this file (e.g. "[MyCustomValue]").
  // appSettings.json.
  "GlobalDefinitions": {
  "GlobalDefinitions": {
    // Disable the GeoFencing service.
    // Uncomment the line below to disable the GeoFencing service.
    "GeoFencingDisabled": true,
    // "GeoFencingDisabled": true,
  },
  },
  "Kestrel": {
  "Kestrel": {
    "Endpoints": {
    "Endpoints": {
      "Http": {
      "Http": {
        "Url": "http://0.0.0.0:5310"
        "Url": "http://0.0.0.0:5310"
      },
      },
      "Grpc": {
      "Grpc": {
        "Url": "http://0.0.0.0:5311"
        "Url": "http://0.0.0.0:5311"
      },
      },
      // "HttpsAndGrpcHttps": {
    }
      //   "Url": "https://0.0.0.0:5312"
   },
      // }
  "HostedServices": {
    }
    "GeoObjectStore": {
  },
      "AutoEndpoints": {
  "HostedServices": {
        "Endpoints": ["Http:5295","Https:5296","Grpc:5297"]
    "GeoObjectStore": {
      },
      "AutoEndpoints": {
      "Settings": {
        "Endpoints": ["Http:5295","Https:5296","Grpc:5297"]
        // StorePath is the folder where the service's geo store files
      },
        // (i.e. SQLite files) can be found. Environment variables such as
      "Settings": {
        // %prgramdata% are expanded in all paths.
        // "StorePath" is the folder where the service's geo store files
        "StorePath": "%programdata%\\TeleplanGlobe\\MariaServiceHoster\\GeoObjectStore"
        // (i.e. SQLite files) can be found. Environment variables such as
      },
        // %prgramdata% are expanded in all paths.
    },
        "StorePath": "%programdata%\\TeleplanGlobe\\MariaServiceHoster\\GeoObjectStore"
    "GeoFencing": {
      },
      "AutoEndpoints": {
    },
        "Endpoints": ["Http:5298","Https:5299"]
    "GeoFencing": {
      },
      "AutoEndpoints": {
      "Settings": {
        "Endpoints": ["Http:5298","Https:5299"]
        "TrackServiceSettings": {
      },
          // TrackServiceUri points to the Maria GDK4 track service.
      "Settings": {
          "TrackServiceUri": "http://localhost:9008/tracks",
        "TrackServiceSettings": {
          "List": "ais.test",
          "TrackServiceUri": "http://localhost:9008/tracks",
          "DataSourceId": "0f368b04-87be-4a3d-8c88-2655a8e4f503",
          "List": "ais.test",
        },
          "DataSourceId": "0f368b04-87be-4a3d-8c88-2655a8e4f503",
      },
        },
    },
      },
    "GeoObjectTiles": {
    },
      "AutoEndpoints": {
    "GeoObjectTiles": {
        "Endpoints": ["Http:5300","Https:5301"]
      "AutoEndpoints": {
      },
        "Endpoints": ["Http:5300","Https:5301"]
      "Settings": {
      },
        // GeoObjectStoreUri must point to a GRPC endpoint. HTTP won't work.
      "Settings": {
        "GeoObjectStoreUri": "http://localhost:5311/geostore",
        // "GeoObjectStoreUri" must point to a GRPC endpoint. HTTP won't work.
        // SymbolPointServiceUri points to the Maria GDK4 symbol point service.
        "GeoObjectStoreUri": "http://localhost:5311/geostore",
        "SymbolPointServiceUri": "http://localhost:9008/symbolpoint",
        "SymbolPointServiceUri": "http://localhost:9008/symbolpoint",
        "StyleXmlPath": "C:/MariaGeoData/Styles",
        "StyleXmlPath": "C:/MariaGeoData/Styles",
      },
      },
    },
    },
    "MariaGeoServer": {
    "MariaGeoServer": {
      "AutoEndpoints": {
      "AutoEndpoints": {
        "Endpoints": ["Http:5302","Https:5303"]
        "Endpoints": ["Http:5302","Https:5303"]
      },
      },
      "Settings": {
      "Settings": {
        "MercatorTilesPath": "c:/MariaGeoData/MercatorTiles",
        "MercatorTilesPath": "c:/MariaGeoData/MercatorTiles",
        "MapPath": "C:/MariaGeoData/Maps",         
        "MapPath": "C:/MariaGeoData/Maps",         
      },
      },
    },
    },
  }
    "ReferenceService": {
}
      "AutoEndpoints": {
</nowiki>
        "Endpoints": ["Http:5304","Grpc:5305"]
 
      },
[[Category:Service setup]]
    },
[[Category:GDK5]]
    "RasterMapServer": {
      "Settings": {
        "MapCatalogUri": "http://localhost:5310/catalog"
      },
    }
  }
}

Latest revision as of 14:00, 30 October 2026

This is an example file that shows how to override the ports and paths used by MariaServiceHoster, plus a few other settings. Save it as appSettings.local.json in the same folder as appSettings.json (the default location is %ProgramData%\TeleplanGlobe\MariaServiceHoster).

{
  // In GlobalDefinitions one can override the values defined in
  // appSettings.json.
  "GlobalDefinitions": {
    // Uncomment the line below to disable the GeoFencing service.
    // "GeoFencingDisabled": true,
  },
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://0.0.0.0:5310"
      },
      "Grpc": {
        "Url": "http://0.0.0.0:5311"
      },
    }
  },
  "HostedServices": {
    "GeoObjectStore": {
      "AutoEndpoints": {
        "Endpoints": ["Http:5295","Https:5296","Grpc:5297"]
      },
      "Settings": {
        // StorePath is the folder where the service's geo store files
        // (i.e. SQLite files) can be found. Environment variables such as
        // %prgramdata% are expanded in all paths.
        "StorePath": "%programdata%\\TeleplanGlobe\\MariaServiceHoster\\GeoObjectStore"
      },
    },
    "GeoFencing": {
      "AutoEndpoints": {
        "Endpoints": ["Http:5298","Https:5299"]
      },
      "Settings": {
        "TrackServiceSettings": {
          // TrackServiceUri points to the Maria GDK4 track service.
          "TrackServiceUri": "http://localhost:9008/tracks",
          "List": "ais.test",
          "DataSourceId": "0f368b04-87be-4a3d-8c88-2655a8e4f503",
        },
      },
    },
    "GeoObjectTiles": {
      "AutoEndpoints": {
        "Endpoints": ["Http:5300","Https:5301"]
      },
      "Settings": {
        // GeoObjectStoreUri must point to a GRPC endpoint. HTTP won't work.
        "GeoObjectStoreUri": "http://localhost:5311/geostore",
        // SymbolPointServiceUri points to the Maria GDK4 symbol point service.
        "SymbolPointServiceUri": "http://localhost:9008/symbolpoint",
        "StyleXmlPath": "C:/MariaGeoData/Styles",
      },
    },
    "MariaGeoServer": {
      "AutoEndpoints": {
        "Endpoints": ["Http:5302","Https:5303"]
      },
      "Settings": {
        "MercatorTilesPath": "c:/MariaGeoData/MercatorTiles",
        "MapPath": "C:/MariaGeoData/Maps",        
      },
    },
  }
}