diff --git a/Classes/Core/Infrastructure/RedisClientManager.php b/Classes/Core/Infrastructure/RedisClientManager.php index 6b8d1a5..b7ea966 100644 --- a/Classes/Core/Infrastructure/RedisClientManager.php +++ b/Classes/Core/Infrastructure/RedisClientManager.php @@ -32,7 +32,7 @@ protected function connect(RedisInstanceIdentifier $redisInstanceIdentifier): \R $redis = new \Redis(); $connected = false; try { - $connected = $redis->connect($instanceConfig['hostname'], $instanceConfig['port'] ?? 6379, $instanceConfig['timeout'] ?? 0) && $redis->select($instanceConfig['database'] ?? 0); + $connected = $redis->connect($instanceConfig['hostname'], $instanceConfig['port'] ?? 6379, $instanceConfig['timeout'] ?? 0) && $redis->auth([$instanceConfig['username'] ?? "default", $instanceConfig['password'] ?? ""]) && $redis->select($instanceConfig['database'] ?? 0); } catch (\Exception $e) { throw new Exception(sprintf('Could not connect to Redis server %s:%d. Detailed reason: see nested exception.', $instanceConfig['hostname'], $instanceConfig['port']), 1630323312, $e); } diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index e4e4907..6aba273 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -10,6 +10,8 @@ Flowpack: hostname: 127.0.0.1 port: 6379 database: 11 + username: '' + password: '' # How many content releases to keep before cleaning them up. # diff --git a/README.md b/README.md index 710648d..eb3b61d 100644 --- a/README.md +++ b/README.md @@ -209,11 +209,15 @@ To enable this feature, do the following: hostname: my-redis-hostname port: 6379 database: 11 + username: '' + password: '' staging: label: 'Staging Site' hostname: my-staging-redis-hostname port: 6379 database: 11 + username: '' + password: '' ``` 2. In `pipelines.yml`, underneath `4) TRANSFER`, comment-in and adjust the `transfer_content` task.