diff --git a/docs/installation.rst b/docs/installation.rst index 3ed27cd..ea92ad8 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -285,9 +285,9 @@ The following options in the ``gravity`` section of ``galaxy.yml`` can be used t # Public-facing port of the proxy # port: 4002 - # Routes file to monitor. - # Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. This is ignored if - # ``interactivetools_map is set``. + # Database to monitor. + # Should be set to the same value as ``interactivetools_map`` (or ``interactivetoolsproxy_map``) in the ``galaxy:`` section. This is + # ignored if either ``interactivetools_map`` or ``interactivetoolsproxy_map`` are set. # sessions: database/interactivetools_map.sqlite # Include verbose messages in gx-it-proxy diff --git a/gravity/settings.py b/gravity/settings.py index 0cff96b..175e61f 100644 --- a/gravity/settings.py +++ b/gravity/settings.py @@ -244,9 +244,9 @@ class GxItProxySettings(BaseModel): sessions: str = Field( default="database/interactivetools_map.sqlite", description=""" -Routes file to monitor. -Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. This is ignored if -``interactivetools_map is set``. +Database to monitor. +Should be set to the same value as ``interactivetools_map`` (or ``interactivetoolsproxy_map``) in the ``galaxy:`` section. This is +ignored if either ``interactivetools_map`` or ``interactivetoolsproxy_map`` are set. """) verbose: bool = Field(default=True, description="Include verbose messages in gx-it-proxy") forward_ip: Optional[str] = Field( diff --git a/gravity/state.py b/gravity/state.py index 78f6161..274ae7b 100644 --- a/gravity/state.py +++ b/gravity/state.py @@ -399,7 +399,10 @@ class GalaxyGxItProxyService(Service): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # override from Galaxy config if set - self.settings["sessions"] = self.config.app_config.get("interactivetools_map", self.settings["sessions"]) + self.settings["sessions"] = ( + self.config.app_config.get("interactivetoolsproxy_map") or + self.config.app_config.get("interactivetools_map", self.settings["sessions"]) + ) # this can only be set in Galaxy config it_base_path = self.config.app_config.get("interactivetools_base_path", "/") it_base_path = "/" + f"/{it_base_path.strip('/')}/".lstrip("/")