-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Is this a new feature request?
- I have searched the existing issues
Wanted change
Adding support for setting a username in Redis configuration, via the Environment variables.
I have a Redis cluster and need to use a username/password to connect to it, but this container provides no option to set the username via environment variables.
I got it working by editing the configuration file manually inside the container, after starting it.
In /config/configuration.py with specific details changed:
REDIS = {
'tasks': {
'HOST': 'rediscluster.domain',
'PORT': 6379,
# Comment out HOST and PORT lines and uncomment the following if using Redis Sentinel
# 'SENTINELS': [('mysentinel.redis.example.com', 6379)],
# 'SENTINEL_SERVICE': 'netbox',
'PASSWORD': 'bbb',
'DATABASE': 0,
'USERNAME': 'aaa',
'SSL': False,
# Set this to True to skip TLS certificate verification
# This can expose the connection to attacks, be careful
# 'INSECURE_SKIP_TLS_VERIFY': False,
},
'caching': {
'HOST': 'rediscluster.domain',
'PORT': 6379,
# Comment out HOST and PORT lines and uncomment the following if using Redis Sentinel
# 'SENTINELS': [('mysentinel.redis.example.com', 6379)],
# 'SENTINEL_SERVICE': 'netbox',
'PASSWORD': 'yyy',
'USERNAME': 'zzz',
'DATABASE': 1,
'SSL': False,
# Set this to True to skip TLS certificate verification
# 'INSECURE_SKIP_TLS_VERIFY': False,
}
}
"USERNAME" line above.
Reason for change
Containers should be cattle, and if this needs to be changed manually, it becomes hard to maintain and update, and adding a line to the environment settings would make it usable in more use-cases with small effort.
Proposed code change
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status