[BUG] docker-compose.yml environment variables do not override ini requirements
See original GitHub issueDescribe the bug When a user has more than the expected maximum number of services (in my case 3 for Sonarr and Radarr), Varken will throw an exception that the expected section does not exist in the ini file.
To Reproduce Steps to reproduce the behavior:
- Edit docker-compose.yml to include 3 of the same service for the *arrs
- Pull down Varken
- Run Varken
Expected behavior Expected Varken to actually override the requirement of the ini file, since everything has already been configured in the environment variables for Varken.
Environment (please complete the following information):
- OS: Docker:Nightly
- Version: 9de2e8090a5451f519a8771f183d23a4180362457001705d63cd543a88102750
Additional context
2022-07-17 17:24:33 : DEBUG : iniparser : sonarr:8989 is a valid URL in module [sonarr-1].
2022-07-17 17:24:33 : DEBUG : iniparser : ********n.tld:8989 is a valid URL in module [sonarr-2].
Traceback (most recent call last):
File "/app/Varken.py", line 92, in <module>
CONFIG = INIParser(DATA_FOLDER)
File "/app/varken/iniparser.py", line 29, in __init__
self.rectify_ini()
File "/app/varken/iniparser.py", line 138, in rectify_ini
self.parse_opts()
File "/app/varken/iniparser.py", line 181, in parse_opts
url = self.url_check(env.get(f'VRKN_{envsection}_URL', self.config.get(section, 'url')),
File "/usr/local/lib/python3.9/configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "/usr/local/lib/python3.9/configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'sonarr-3'
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unable to override environment variables if they are present in ...
Description v2.9.0 does not allow environment variables to be overridden if they are already present in .env. Steps to reproduce the issue: ...
Read more >Environment variables in Compose | Docker Documentation
You can override the environment file path using a command line argument --env-file . Using the “--env-file” option . By passing the...
Read more >How to use docker-compose environment variables to ...
I'm trying to understand how can I pass environment variables via docker-compose to populate missing variables values in a config file during ...
Read more >Installation with Docker - Docs
ini can be set or overridden with an environment variable of the form: GITEA__SECTION_NAME__KEY_NAME . These settings are applied each time the docker...
Read more >Load config from file & environment variables in Golang with ...
Why Viper · It can find, load, and unmarshal values from a config file. · It supports many types of files, such as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Removed.
That’s fine, but the documentation needs to be clear because as of right now it states that you can do either one, and the ENV variables will override the ini, which is why I set it up this way in the first place.