支持通过配置文件配置redis服务器
This commit is contained in:
parent
8614794747
commit
d0b7807a36
@ -18,6 +18,12 @@ DB_USERNAME=
|
|||||||
# 数据库密码[string]
|
# 数据库密码[string]
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
# Redis地址[string]
|
||||||
|
RD_HOST=
|
||||||
|
# Redis端口[int]
|
||||||
|
RD_PORT=
|
||||||
|
|
||||||
# 验证码配置
|
# 验证码配置
|
||||||
# 验证服务提供商[reCAPTCHA,hCaptcha,Turnstile,None]
|
# 验证服务提供商[reCAPTCHA,hCaptcha,Turnstile,None]
|
||||||
VERIFY_PROVIDER=
|
VERIFY_PROVIDER=
|
||||||
|
@ -61,8 +61,8 @@ $config = [
|
|||||||
],
|
],
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'class' => 'yii\redis\Connection',
|
'class' => 'yii\redis\Connection',
|
||||||
'hostname' => 'localhost',
|
'hostname' => $_ENV['RD_HOST'],
|
||||||
'port' => 6379,
|
'port' => $_ENV['RD_PORT'],
|
||||||
'database' => 0,
|
'database' => 0,
|
||||||
],
|
],
|
||||||
'db' => $db,
|
'db' => $db,
|
||||||
|
Loading…
Reference in New Issue
Block a user