summaryrefslogtreecommitdiffstats
path: root/22.0/fpm-alpine/config/redis.config.php
blob: a5fde3c7be37a851d4891fe251c040e98ce15ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
if (getenv('REDIS_HOST')) {
  $CONFIG = array(
    'memcache.distributed' => '\OC\Memcache\Redis',
    'memcache.locking' => '\OC\Memcache\Redis',
    'redis' => array(
      'host' => getenv('REDIS_HOST'),
      'password' => (string) getenv('REDIS_HOST_PASSWORD'),
    ),
  );

  if (getenv('REDIS_HOST_PORT') !== false) {
    $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
  } elseif (getenv('REDIS_HOST')[0] != '/') {
    $CONFIG['redis']['port'] = 6379;
  }
}