Skip to content

Commit e1f1539

Browse files
Add support for REDIS_N_AUTH_FILE
1 parent d8b2452 commit e1f1539

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Environment variables summary
5656
* ``REDIS_1_NAME`` - define name of the Redis server
5757
* ``REDIS_1_PORT`` - define port of the Redis server
5858
* ``REDIS_1_AUTH`` - define password of the Redis server
59+
* ``REDIS_1_AUTH_FILE`` - define file containing the password of the Redis server
5960
* ``REDIS_1_DATABASES`` - You can modify you config to prevent phpRedisAdmin from using CONFIG command
6061
* ``ADMIN_USER`` - define username for user-facing Basic Auth
6162
* ``ADMIN_PASS`` - define password for user-facing Basic Auth

includes/config.environment.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
$server_name = getenv($prefix . 'NAME');
2424
$server_host = getenv($prefix . 'HOST');
2525
$server_port = getenv($prefix . 'PORT');
26-
$server_auth = getenv($prefix . 'AUTH');
26+
if (getenv($prefix . 'AUTH_FILE') !== false) {
27+
$server_auth = file_get_contents(getenv($prefix . 'AUTH_FILE'));
28+
} else {
29+
$server_auth = getenv($prefix . 'AUTH');
30+
}
2731
$server_databases = getenv($prefix . 'DATABASES');
2832

2933
if (empty($server_host)) {

0 commit comments

Comments
 (0)