I have been searching for hours and could not solve the problem. When I do it like the laravel docs https://laravel.com/docs/8.x/redis#clusters it doesn't work and it doesn't try to connect via the cluster but just uses the default redis configs 127.0.0.1:6379.
I now have the impression that Blomstra\Redis\Extend\Redis does not respect the settings according to laravel. All env vars are set correctly and when i debug i see the correct env values in the logs. But with following config, it always want to connect to [tcp://127.0.0.1:6379 and i get the error message .
flarum.ERROR: Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379]
new Blomstra\Redis\Extend\Redis(
[
'options' => [
'cluster' => "redis",
],
'clusters' => [
'default' => [
[
'host' => getenv('REDIS_CLUSTER_HOST_1'),
'password' => getenv('REDIS_CLUSTER_PASSWORD_1'),
'port' => getenv('REDIS_CLUSTER_PORT_1'),
'database' => getenv('REDIS_CLUSTER_DB_1')
]
],
],
]
)