init admin

This commit is contained in:
2025-11-07 09:56:20 +08:00
commit d9d7ddc05d
2718 changed files with 665424 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
return [
'enable' => true,
'build_dir' => BASE_PATH . DIRECTORY_SEPARATOR . 'build',
'phar_filename' => 'webman.phar',
'bin_filename' => 'webman.bin',
'signature_algorithm'=> Phar::SHA256, //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL.
'private_key_file' => '', // The file path for certificate or OpenSSL private key file.
'exclude_pattern' => '#^(?!.*(composer.json|/.github/|/.idea/|/.git/|/.setting/|/runtime/|/vendor-bin/|/build/|/vendor/webman/admin/))(.*)$#',
'exclude_files' => [
'.env', 'LICENSE', 'composer.json', 'composer.lock', 'start.php', 'webman.phar', 'webman.bin'
],
'custom_ini' => '
memory_limit = 256M
',
];
+4
View File
@@ -0,0 +1,4 @@
<?php
return [
'enable' => true,
];
@@ -0,0 +1,17 @@
<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
return [
Webman\Event\BootStrap::class,
];
@@ -0,0 +1,7 @@
<?php
use Webman\Event\EventListCommand;
return [
EventListCommand::class
];
+22
View File
@@ -0,0 +1,22 @@
<?php
return [
'enable' => true,
'exception' => [
// 是否记录异常到日志
'enable' => true,
// 不会记录到日志的异常类
'dontReport' => [
support\exception\BusinessException::class
]
],
'dontReport' => [
'app' => [
],
'controller' => [
],
'action' => [
],
'path' => [
]
]
];
@@ -0,0 +1,21 @@
<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Webman\Log\Middleware;
return [
'' => [
Middleware::class
]
];
@@ -0,0 +1,4 @@
<?php
return [
'enable' => true,
];
@@ -0,0 +1,7 @@
<?php
use Webman\RedisQueue\Command\MakeConsumerCommand;
return [
MakeConsumerCommand::class
];
@@ -0,0 +1,32 @@
<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
return [
'default' => [
'handlers' => [
[
'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [
runtime_path() . '/logs/redis-queue/queue.log',
7, //$maxFiles
Monolog\Logger::DEBUG,
],
'formatter' => [
'class' => Monolog\Formatter\LineFormatter::class,
'constructor' => [null, 'Y-m-d H:i:s', true],
],
]
],
]
];
@@ -0,0 +1,19 @@
<?php
return [
'consumer' => [
'handler' => Webman\RedisQueue\Process\Consumer::class,
'count' => \support\Env::get('app.debug',false) ? 2 : cpu_count() * 4,
'constructor' => [
// 消费者类目录
'consumer_dir' => app_path() . '/queue/redis'
]
],
'redis_consumer_slow' => [ // key是自定义的,没有格式限制,这里取名redis_consumer_slow
'handler' => Webman\RedisQueue\Process\Consumer::class,
'count' => 1,
'constructor' => [
// 消费者类目录
'consumer_dir' => app_path() . '/queue/single'
]
]
];
@@ -0,0 +1,13 @@
<?php
return [
'default' => [
'host' => 'redis://'.\support\Env::get('redis.host','127.0.0.1').':'.\support\Env::get('redis.port',6379),
'options' => [
'auth' => \support\Env::get('redis.password',null), // 密码,字符串类型,可选参数
'db' => \support\Env::get('redis.database',0), // 数据库
'prefix' => \support\Env::get('redis.prefix'), // key 前缀
'max_attempts' => 5, // 消费失败后,重试次数
'retry_seconds' => 10, // 重试间隔,单位秒
]
]
];