Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed REDIS_INTERFACE config overrides #312

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions images/php/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,7 @@
$redis_port = getenv('REDIS_SERVICE_PORT') ?: '6379';
$redis_timeout = getenv('REDIS_TIMEOUT') ?: 1;
$redis_password = getenv('REDIS_PASSWORD') ?: '';

$redis_interface = 'PhpRedis';

if (class_exists('\Drupal\redis\Cache\PhpRedisCluster')) {
// Assume that if the cluster class exists we need to use it.
$redis_interface = 'PhpRedisCluster';
}

if (getenv('REDIS_INTERFACE')) {
// Allow environment variable override for the interface (eg. forcing
// connection via a standalone pod).
$redis_interface = getenv('REDIS_INTERFACE');
}
$redis_interface = getenv('REDIS_INTERFACE') ?: 'PhpRedis';

$settings['redis.connection']['host'] = $redis_host;
$settings['redis.connection']['port'] = $redis_port;
Expand Down
Loading