Add support to override .env keys from actual environment
Useful when the same .env file is used to initialize docker-compose but
want to change the .env file value at runtime.
MODIFY
plextraktsync/config.default.json
plextraktsync/config.default.json
"filename": "plextraktsync.log",
"append": true
},
+ "config": {
+ "dotenv_override": true
+ },
"cache": {
"path": "$PTS_CACHE_DIR/trakt_cache"
},

MODIFY
plextraktsync/config.py
plextraktsync/config.py
@@ -70,8 +70,9 @@ def initialize(self):
config = self.load_json(self.config_file)
self.merge(config, self)
+ override = self["config"]["dotenv_override"]
- load_dotenv(self.env_file)
+ load_dotenv(self.env_file, override=override)
for key in self.env_keys:
value = getenv(key)
if value == "-" or value == "None" or value == "":

Add support to override .env keys from actual environment

Useful when the same .env file is used to initialize docker-compose but
want to change the .env file value at runtime.