forked from GithubBackups/vichan
update is_docker
This commit is contained in:
parent
38d96b80a5
commit
37fec1b82f
@ -12,7 +12,6 @@ defined('TINYBOARD') or exit;
|
||||
class Cache {
|
||||
private static function buildCache(): CacheDriver {
|
||||
global $config;
|
||||
$isDocker = is_file("/.dockerenv") || is_file("/run/.containerenv");
|
||||
|
||||
switch ($config['cache']['enabled']) {
|
||||
case 'memcached':
|
||||
@ -26,7 +25,7 @@ class Cache {
|
||||
$password = $config['cache']['redis'][2] ?? '';
|
||||
$database = $config['cache']['redis'][3] ?? 1;
|
||||
|
||||
if ($isDocker) {
|
||||
if ($config['is_docker']) {
|
||||
$host = getenv('VICHAN_REDIS_HOST') ?: $host;
|
||||
$port = getenv('VICHAN_REDIS_PORT') ?: $port;
|
||||
$password = getenv('VICHAN_REDIS_PASSWORD') ?: $password;
|
||||
|
||||
@ -1859,7 +1859,7 @@
|
||||
*/
|
||||
|
||||
$isDocker = is_file("/.dockerenv") || is_file("/run/.containerenv");
|
||||
$config['docker'] = $isDocker;
|
||||
$config['is_docker'] = $isDocker;
|
||||
|
||||
/*
|
||||
* ====================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user