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