Skip to content

Commit

Permalink
fix: 格式化 env 应用配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Aug 7, 2024
1 parent 5bc95b7 commit 496b6a5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
6 changes: 1 addition & 5 deletions plugin/think-plugs-static/.env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[app]
debug=true
trace=true

[mysql]
hostname=127.0.0.1
database=admin_dv
Expand All @@ -14,4 +10,4 @@ prefix=
host=127.0.0.1
password=""
port=6379
select=0
select=0
14 changes: 7 additions & 7 deletions plugin/think-plugs-static/stc/config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'default' => 'file',
// 缓存连接配置
'stores' => [
'file' => [
'file' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
Expand All @@ -33,7 +33,7 @@
// 序列化机制
'serialize' => [],
],
'safe' => [
'safe' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
Expand All @@ -49,11 +49,11 @@
],
'redis' => [
// 驱动方式
'type' => 'redis',
'host' => env('redis.host','127.0.0.1'),
'password' => env('redis.password',''),
'select' => env('redis.select',0),
'port' => env('redis.port',6379),
'type' => 'redis',
'host' => env('redis.host', '127.0.0.1'),
'port' => env('redis.port', 6379),
'select' => env('redis.select', 0),
'password' => env('redis.password', ''),
]
],
];
14 changes: 7 additions & 7 deletions plugin/think-plugs-static/stc/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

return [
// 默认使用的数据库连接配置
'default' => 'mysql',
'default' => 'sqlite',
// 自定义时间查询规则
'time_query_rule' => [],
// 自动写入时间戳字段
Expand All @@ -29,21 +29,21 @@
// 数据库类型
'type' => 'mysql',
// 服务器地址
'hostname' => env('mysql.hostname','106.55.25.32'),
'hostname' => env('mysql.hostname', '127.0.0.1'),
// 数据库名
'database' => env('mysql.database','admin_dv'),
'database' => env('mysql.database', 'thinkadmin'),
// 用户名
'username' => env('mysql.username','admin_dv'),
'username' => env('mysql.username', 'thinkadmin'),
// 密码
'password' => env('mysql.password','3twr7kNZLXeSGtc7'),
'password' => env('mysql.password', 'thinkadmin'),
// 端口
'hostport' => env('mysql.hostport','3306'),
'hostport' => env('mysql.hostport', '3306'),
// 数据库连接参数
'params' => [],
// 数据库编码默认采用 utf8
'charset' => 'utf8mb4',
// 数据库表前缀
'prefix' => env('mysql.prefix',''),
'prefix' => env('mysql.prefix', ''),
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
Expand Down

0 comments on commit 496b6a5

Please sign in to comment.