Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] docker-compose.yml environment variables do not override ini requirements

See original GitHub issue

Describe 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:

  1. Edit docker-compose.yml to include 3 of the same service for the *arrs
  2. Pull down Varken
  3. 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/", line 92, in <module>
  File "/app/varken/", line 29, in __init__
  File "/app/varken/", line 138, in rectify_ini
  File "/app/varken/", 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/", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/local/lib/python3.9/", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'sonarr-3'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

samwiseg0commented, Jul 17, 2022


BRTPOBcommented, Jul 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found