diff --git a/server/compose.yml b/server/compose.yml index 73fefd8..a1b5f17 100644 --- a/server/compose.yml +++ b/server/compose.yml @@ -13,14 +13,18 @@ services: timeout: 30s retries: 3 environment: - RECCEIVER_PROCS: cf - RECCEIVER_LOGLEVEL: DEBUG - RECCEIVER_INFOTAGS: archive - RECCEIVER_ALIAS: TRUE - RECCEIVER_RECORDTYPE: TRUE - RECCEIVER_RECORDDESC: TRUE - RECCEIVER_CLEANONSTART: TRUE - RECCEIVER_USERNAME: admin + RECCEIVER_RECCEIVER_PROCS: cf + RECCEIVER_RECCEIVER_LOGLEVEL: DEBUG + RECCEIVER_CF_INFOTAGS: archive + RECCEIVER_CF_ALIAS: TRUE + RECCEIVER_CF_RECORDTYPE: TRUE + RECCEIVER_CF_RECORDDESC: TRUE + RECCEIVER_CF_CLEANONSTART: TRUE + RECCEIVER_CF_USERNAME: admin + RECCEIVER_CF_CFUSERNAME: admin + RECCEIVER_CF_CFPASSWORD: password + RECCEIVER_CF_BASEURL: http://cf:8080/ChannelFinder + RECCEIVER_CF_VERIFYSSL: FALSE volumes: - type: bind source: docker/config/cf.conf diff --git a/server/demo.conf b/server/demo.conf index 67eac4c..5ceecc3 100644 --- a/server/demo.conf +++ b/server/demo.conf @@ -108,3 +108,16 @@ # The env variable to use for the owner field when creating channels in channelfinder #env_owner_variable = ENGINEER + +# ChannelFinderClient configuration +# The URL of the ChannelFinder instance to connect to +#baseUrl = http://localhost:8080/ChannelFinder + +# Username to login to ChannelFinder with +#cfUsername = cfstore + +# Password to login to ChannelFinder with +#cfPassword = cfstore + +# Whether to verify the SSL certificate when connecting to ChannelFinder +#verifySSL = True diff --git a/server/recceiver/processors.py b/server/recceiver/processors.py index 5f95c11..352f67d 100644 --- a/server/recceiver/processors.py +++ b/server/recceiver/processors.py @@ -22,15 +22,15 @@ ] -def _env_vars(): - prefix = "RECCEIVER_" +def _env_vars(section: str) -> dict[str, str]: + prefix = "RECCEIVER_" + section.upper() + "_" return {k.removeprefix(prefix).lower(): v for k, v in os.environ.items() if k.startswith(prefix)} class ConfigAdapter(object): def __init__(self, conf, section): self._C, self._S = conf, section - self.env_vars = _env_vars() + self.env_vars = _env_vars(section) def __len__(self): return len(self._C.items(self._S, raw=True)) @@ -77,7 +77,7 @@ def __init__(self, cfile=None): elif not parser.has_section("recceiver"): parser.add_section("recceiver") - pnames = parser.get("recceiver", "procs", vars=_env_vars()).split(",") + pnames = parser.get("recceiver", "procs", vars=_env_vars("recceiver")).split(",") plugs = {} diff --git a/server/recceiver_full.conf b/server/recceiver_full.conf index 6f73a01..27042f3 100644 --- a/server/recceiver_full.conf +++ b/server/recceiver_full.conf @@ -104,10 +104,15 @@ username = cfstore # The env variable to use for the owner field when creating channels in channelfinder env_owner_variable = ENGINEER -# The channelFinder client is configuration information is -# stored in /etc/channelfinderapi.conf as described in the client -# Can be configured to be this file, like so: -[DEFAULT] -BaseURL=http://channelfinder.site:8080/ChannelFinder -username=MyUserName -password=MyPassword +# ChannelFinderClient configuration +# The URL of the ChannelFinder instance to connect to +baseUrl = https://channelfinder.example.com/ChannelFinder + +# Username to login to ChannelFinder with +cfUsername = recceiver-cfstore + +# Password to login to ChannelFinder with +cfPassword = somethingcryptic + +# Whether to verify the SSL certificate when connecting to ChannelFinder +verifySSL = True