From 6a542e9ee19efa4f170481162902f19bcba58a41 Mon Sep 17 00:00:00 2001 From: Sky Brewer Date: Thu, 26 Mar 2026 14:21:58 +0100 Subject: [PATCH 1/3] Pass section to env vars Otherwise you can't actually pass env vars as config --- server/recceiver/processors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/recceiver/processors.py b/server/recceiver/processors.py index 5f95c11..9b9bd97 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)) From d18e7d4074ab656d3d8b62a00c1824a1440c2e47 Mon Sep 17 00:00:00 2001 From: Sky Brewer Date: Thu, 26 Mar 2026 16:32:29 +0100 Subject: [PATCH 2/3] Update configuration files Sets all the new variables in the demo.conf and full.conf Also sets the compose file to use the correct env variable names --- server/compose.yml | 20 ++++++++++++-------- server/demo.conf | 13 +++++++++++++ server/recceiver_full.conf | 19 ++++++++++++------- 3 files changed, 37 insertions(+), 15 deletions(-) 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_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 From fadd8590e49e476214d9a9a2ba488686cc7823cd Mon Sep 17 00:00:00 2001 From: Sky Brewer Date: Fri, 27 Mar 2026 12:50:36 +0100 Subject: [PATCH 3/3] fixup! Pass section to env vars --- server/recceiver/processors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/recceiver/processors.py b/server/recceiver/processors.py index 9b9bd97..352f67d 100644 --- a/server/recceiver/processors.py +++ b/server/recceiver/processors.py @@ -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 = {}