diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2022-08-25 09:15:13 +0300 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2022-08-25 09:15:13 +0300 |
commit | e1f15392891d3648fafb3d2ec074db041a164faf (patch) | |
tree | 50f88b40e8d7be1106b11c5eca060171da28f730 | |
parent | d8b24525562d8f6f2392a212242e094cdd9d8697 (diff) |
Add support for REDIS_N_AUTH_FILE
-rw-r--r-- | README.markdown | 1 | ||||
-rw-r--r-- | includes/config.environment.inc.php | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 15de6f7..6c90f58 100644 --- a/README.markdown +++ b/README.markdown @@ -56,6 +56,7 @@ Environment variables summary * ``REDIS_1_NAME`` - define name of the Redis server * ``REDIS_1_PORT`` - define port of the Redis server * ``REDIS_1_AUTH`` - define password of the Redis server +* ``REDIS_1_AUTH_FILE`` - define file containing the password of the Redis server * ``REDIS_1_DATABASES`` - You can modify you config to prevent phpRedisAdmin from using CONFIG command * ``ADMIN_USER`` - define username for user-facing Basic Auth * ``ADMIN_PASS`` - define password for user-facing Basic Auth diff --git a/includes/config.environment.inc.php b/includes/config.environment.inc.php index 587899c..798281f 100644 --- a/includes/config.environment.inc.php +++ b/includes/config.environment.inc.php @@ -23,7 +23,11 @@ while (true) { $server_name = getenv($prefix . 'NAME'); $server_host = getenv($prefix . 'HOST'); $server_port = getenv($prefix . 'PORT'); - $server_auth = getenv($prefix . 'AUTH'); + if (getenv($prefix . 'AUTH_FILE') !== false) { + $server_auth = file_get_contents(getenv($prefix . 'AUTH_FILE')); + } else { + $server_auth = getenv($prefix . 'AUTH'); + } $server_databases = getenv($prefix . 'DATABASES'); if (empty($server_host)) { |