1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00
course-tencent-cloud/config/config.default.php
xiaochong0302 d5353ff5d2 1.增加log.trace日志配置
2.migration抽象增加saveSetting方法
2024-08-13 09:27:26 +08:00

196 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
$config = [];
/**
* 运行环境dev|test|pro
*/
$config['env'] = 'pro';
/**
* 密钥
*/
$config['key'] = 'mlq7jQ1Py8kTdW9m';
/**
* 所在时区
*/
$config['timezone'] = 'Asia/Shanghai';
/**
* 日志级别
*/
$config['log']['level'] = Phalcon\Logger::INFO;
/**
* 日志链路
*/
$config['log']['trace'] = false;
/**
* 网站根地址,必须以"/"结尾
*/
$config['base_uri'] = '/';
/**
* 静态资源根地址,必须以"/"结尾
*/
$config['static_base_uri'] = '/static/';
/**
* 静态资源版本
*/
$config['static_version'] = '202004080830';
/**
* 数据库主机名
*/
$config['db']['host'] = 'mysql';
/**
* 数据库端口
*/
$config['db']['port'] = 3306;
/**
* 数据库名称
*/
$config['db']['dbname'] = 'ctc';
/**
* 数据库用户名
*/
$config['db']['username'] = 'ctc';
/**
* 数据库密码
*/
$config['db']['password'] = '1qaz2wsx3edc';
/**
* 数据库编码
*/
$config['db']['charset'] = 'utf8mb4';
/**
* redis主机名
*/
$config['redis']['host'] = 'redis';
/**
* redis端口号
*/
$config['redis']['port'] = 6379;
/**
* redis库编号
*/
$config['redis']['index'] = 0;
/**
* redis密码
*/
$config['redis']['auth'] = '1qaz2wsx3edc';
/**
* 缓存有效期(秒)
*/
$config['cache']['lifetime'] = 24 * 3600;
/**
* 会话有效期(秒)
*/
$config['session']['lifetime'] = 24 * 3600;
/**
* 令牌有效期(秒)
*/
$config['token']['lifetime'] = 7 * 86400;
/**
* 元数据有效期(秒)
*/
$config['metadata']['lifetime'] = 7 * 86400;
/**
* 注解有效期(秒)
*/
$config['annotation']['lifetime'] = 7 * 86400;
/**
* CsrfToken有效期
*/
$config['csrf_token']['lifetime'] = 86400;
/**
* 允许跨域
*/
$config['cors']['enabled'] = true;
/**
* 允许跨域域名(字符|数组)
*/
$config['cors']['allow_origin'] = '*';
/**
* 允许跨域字段string|array
*/
$config['cors']['allow_headers'] = '*';
/**
* 允许跨域方法
*/
$config['cors']['allow_methods'] = ['GET', 'POST', 'OPTIONS'];
/**
* 限流开启
*/
$config['throttle']['enabled'] = true;
/**
* 有效期(秒)
*/
$config['throttle']['lifetime'] = 60;
/**
* 限流频率
*/
$config['throttle']['rate_limit'] = 60;
/**
* 客户端ping服务端间隔
*/
$config['websocket']['ping_interval'] = 30;
/**
* 客户端连接地址外部可访问的域名或ip带端口号
*/
$config['websocket']['connect_address'] = 'your_domain.com:8282';
/**
* gateway和worker注册地址带端口号
*/
$config['websocket']['register_address'] = '127.0.0.1:1238';
/**
* 资源监控: CPU负载0.1-1.0
*/
$config['server_monitor']['cpu'] = 0.8;
/**
* 资源监控: 内存剩余占比10-100%
*/
$config['server_monitor']['memory'] = 10;
/**
* 资源监控: 磁盘剩余占比10-100%
*/
$config['server_monitor']['disk'] = 20;
return $config;