buildadmin/config/buildadmin.php

107 lines
4.2 KiB
PHP
Raw Normal View History

<?php
// +----------------------------------------------------------------------
// | BuildAdmin设置
// +----------------------------------------------------------------------
return [
// 允许跨域访问的域名
2022-03-22 15:37:38 +00:00
'cors_request_domain' => 'localhost,127.0.0.1',
// 是否开启管理员登录验证码
'admin_login_captcha' => true,
// 会员登录失败可重试次数,false则无限
'user_login_retry' => 10,
// 管理员登录失败可重试次数,false则无限
2022-03-22 15:37:38 +00:00
'admin_login_retry' => 10,
2022-03-10 14:50:16 +00:00
// 表格拖拽排序时,两个权重相等则自动重新整理;控制器类中也有此项(作为单控制器自定义配置)
2022-03-22 15:37:38 +00:00
'auto_sort_eq_weight' => false,
2022-07-14 14:38:49 +00:00
// 开启前台会员中心
'open_member_center' => true,
// 允许执行的命令
2022-03-22 15:37:38 +00:00
'allowed_commands' => [
'install-package-manager' => [
'cnpm' => 'npm install cnpm -g --registry=https://registry.npmmirror.com',
'yarn' => 'npm install -g yarn',
'pnpm' => 'npm install -g pnpm',
'ni' => 'npm install -g @antfu/ni',
],
'version-view' => [
'npm' => 'npm -v',
'cnpm' => 'cnpm -v',
'yarn' => 'yarn -v',
'pnpm' => 'pnpm -v',
'node' => 'node -v',
],
'test-install' => [
'npm' => 'cd npm-install-test && npm install',
'cnpm' => 'cd npm-install-test && cnpm install',
'yarn' => 'cd npm-install-test && yarn install',
'pnpm' => 'cd npm-install-test && pnpm install',
'ni' => 'cd npm-install-test && ni install',
],
'web-install' => [
'npm' => 'cd ../web && npm install',
'cnpm' => 'cd ../web && cnpm install',
'yarn' => 'cd ../web && yarn install',
'pnpm' => 'cd ../web && pnpm install',
'ni' => 'cd ../web && ni install',
],
'web-build' => [
'npm' => 'cd ../web && npm run build',
'cnpm' => 'cd ../web && cnpm run build',
'yarn' => 'cd ../web && yarn run build',
'pnpm' => 'cd ../web && pnpm run build',
'ni' => 'cd ../web && nr build',
],
'set-registry' => [
'npm' => 'npm config set registry https://registry.npmjs.org/ && npm config get registry',
'taobao' => 'npm config set registry https://registry.npm.taobao.org/ && npm config get registry',
'rednpm' => 'npm config set registry http://registry.mirror.cqupt.edu.cn/ && npm config get registry'
],
'composer' => [
'update' => 'cd ../ && composer update',
],
'ping-baidu' => 'ping baidu.com',
],
2022-03-22 15:37:38 +00:00
'token' => [
2022-02-25 17:09:03 +00:00
// 默认驱动方式
'default' => 'mysql',
// 加密key
'key' => 'tcbDgmqLVzuAdNH39o0QnhOisvSCFZ7I',
// 加密方式
'algo' => 'ripemd160',
// 驱动
'stores' => [
'mysql' => [
'type' => 'Mysql',
// 留空表示使用默认的 Mysql 数据库,也可以填写其他数据库连接配置的`name`
'name' => '',
// 存储token的表名
'table' => 'token',
// 默认 token 有效时间
'expire' => 2592000,
],
'redis' => [
'type' => 'Redis',
'host' => '127.0.0.1',
'port' => 6379,
'password' => '',
'select' => 0,
'timeout' => 0,
'expire' => 0,
'persistent' => false,
'userprefix' => 'up:',
'tokenprefix' => 'tp:',
]
]
2022-03-11 17:29:06 +00:00
],
2022-03-22 15:37:38 +00:00
// 自动写入管理员操作日志
'auto_write_admin_log' => true,
// 缺省头像图片路径
'default_avatar' => '/static/images/avatar.png',
// 内容分发网络URL
'cdn_url' => '',
2022-05-22 02:35:32 +00:00
// 版本号
2022-07-31 06:27:10 +00:00
'version' => 'v1.0.3',
// 接口地址
'api_url' => 'https://ba.buildadmin.com',
];