登录
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
*-------------------------------------------------------------------------p*
|
||||
* 配置文件
|
||||
*-------------------------------------------------------------------------h*
|
||||
* @copyright Copyright (c) 2015-2022 Shopwwi Inc. (http://www.shopwwi.com)
|
||||
*-------------------------------------------------------------------------c*
|
||||
* @license http://www.shopwwi.com s h o p w w i . c o m
|
||||
*-------------------------------------------------------------------------e*
|
||||
* @link http://www.shopwwi.com by 象讯科技 phcent.com
|
||||
*-------------------------------------------------------------------------n*
|
||||
* @since shopwwi象讯·PHP商城系统Pro
|
||||
*-------------------------------------------------------------------------t*
|
||||
*/
|
||||
|
||||
return [
|
||||
'enable' => true,
|
||||
'default' => 'local',
|
||||
'max_size' => 1024 * 1024 * 10, //单个文件大小10M
|
||||
'ext_yes' => [], //允许上传文件类型 为空则为允许所有
|
||||
'ext_no' => [], // 不允许上传文件类型 为空则不限制
|
||||
'storage' => [
|
||||
'public' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\LocalAdapterFactory::class,
|
||||
'root' => public_path(),
|
||||
'url' => '//127.0.0.1:8787' // 静态文件访问域名
|
||||
],
|
||||
'local' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\LocalAdapterFactory::class,
|
||||
'root' => runtime_path(),
|
||||
'url' => '//127.0.0.1:8787' // 静态文件访问域名
|
||||
],
|
||||
'ftp' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\FtpAdapterFactory::class,
|
||||
'host' => 'ftp.example.com',
|
||||
'username' => 'username',
|
||||
'password' => 'password',
|
||||
'url' => '' // 静态文件访问域名
|
||||
// 'port' => 21,
|
||||
// 'root' => '/path/to/root',
|
||||
// 'passive' => true,
|
||||
// 'ssl' => true,
|
||||
// 'timeout' => 30,
|
||||
// 'ignorePassiveAddress' => false,
|
||||
// 'timestampsOnUnixListingsEnabled' => true,
|
||||
],
|
||||
'memory' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\MemoryAdapterFactory::class,
|
||||
],
|
||||
's3' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\S3AdapterFactory::class,
|
||||
'credentials' => [
|
||||
'key' => 'S3_KEY',
|
||||
'secret' => 'S3_SECRET',
|
||||
],
|
||||
'region' => 'S3_REGION',
|
||||
'version' => 'latest',
|
||||
'bucket_endpoint' => false,
|
||||
'use_path_style_endpoint' => false,
|
||||
'endpoint' => 'S3_ENDPOINT',
|
||||
'bucket_name' => 'S3_BUCKET',
|
||||
'url' => '' // 静态文件访问域名
|
||||
],
|
||||
'minio' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\S3AdapterFactory::class,
|
||||
'credentials' => [
|
||||
'key' => 'S3_KEY',
|
||||
'secret' => 'S3_SECRET',
|
||||
],
|
||||
'region' => 'S3_REGION',
|
||||
'version' => 'latest',
|
||||
'bucket_endpoint' => false,
|
||||
'use_path_style_endpoint' => true,
|
||||
'endpoint' => 'S3_ENDPOINT',
|
||||
'bucket_name' => 'S3_BUCKET',
|
||||
'url' => '' // 静态文件访问域名
|
||||
],
|
||||
'oss' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\AliyunOssAdapterFactory::class,
|
||||
'accessId' => getenv('OSS_ACCESSID'),
|
||||
'accessSecret' => getenv('OSS_ACCESSSECRET'),
|
||||
'bucket' => getenv('OSS_BUCKET'),
|
||||
'endpoint' => getenv('OSS_ENDPOINT'),
|
||||
'url' => getenv('OSS_STATIC_URL'), // 静态文件访问域名
|
||||
// 'timeout' => 3600,
|
||||
// 'connectTimeout' => 10,
|
||||
// 'isCName' => false,
|
||||
// 'token' => null,
|
||||
// 'proxy' => null,
|
||||
],
|
||||
'qiniu' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\QiniuAdapterFactory::class,
|
||||
'accessKey' => 'QINIU_ACCESS_KEY',
|
||||
'secretKey' => 'QINIU_SECRET_KEY',
|
||||
'bucket' => 'QINIU_BUCKET',
|
||||
'domain' => 'QINBIU_DOMAIN',
|
||||
'url' => '' // 静态文件访问域名
|
||||
],
|
||||
'cos' => [
|
||||
'driver' => \Shopwwi\WebmanFilesystem\Adapter\CosAdapterFactory::class,
|
||||
'region' => 'COS_REGION',
|
||||
'app_id' => 'COS_APPID',
|
||||
'secret_id' => 'COS_SECRET_ID',
|
||||
'secret_key' => 'COS_SECRET_KEY',
|
||||
// 可选,如果 bucket 为私有访问请打开此项
|
||||
// 'signed_url' => false,
|
||||
'bucket' => 'COS_BUCKET',
|
||||
'read_from_cdn' => false,
|
||||
'url' => '' // 静态文件访问域名
|
||||
// 'timeout' => 60,
|
||||
// 'connect_timeout' => 60,
|
||||
// 'cdn' => '',
|
||||
// 'scheme' => 'https',
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -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
|
||||
',
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
];
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Webman\GatewayWorker\Gateway;
|
||||
use Webman\GatewayWorker\BusinessWorker;
|
||||
use Webman\GatewayWorker\Register;
|
||||
|
||||
return [
|
||||
'gateway' => [
|
||||
'handler' => Gateway::class,
|
||||
'listen' => 'websocket://0.0.0.0:' . getenv('GATEWAY_LISTEN'),
|
||||
'count' => 3,
|
||||
'reloadable' => false,
|
||||
'constructor' => ['config' => [
|
||||
'lanIp' => '127.0.0.1',
|
||||
'startPort' => 2300,
|
||||
'pingInterval' => 55,
|
||||
'pingNotResponseLimit' => 1,
|
||||
'pingData' => '',
|
||||
'registerAddress' => '127.0.0.1:1236',
|
||||
'onConnect' => function(){},
|
||||
]]
|
||||
],
|
||||
'worker' => [
|
||||
'handler' => BusinessWorker::class,
|
||||
'count' => 2,
|
||||
'constructor' => ['config' => [
|
||||
'eventHandler' => plugin\webman\gateway\Events::class,
|
||||
'name' => 'ChatBusinessWorker',
|
||||
'registerAddress' => '127.0.0.1:1236',
|
||||
]]
|
||||
],
|
||||
'register' => [
|
||||
'handler' => Register::class,
|
||||
'listen' => 'text://127.0.0.1:1236',
|
||||
'count' => 1, // Must be 1
|
||||
'reloadable' => false,
|
||||
'constructor' => []
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
'exception' => [
|
||||
// 是否记录异常到日志
|
||||
'enable' => true,
|
||||
// 不会记录到日志的异常类
|
||||
'dontReport' => [
|
||||
support\exception\BusinessException::class
|
||||
]
|
||||
],
|
||||
'dontReport' => [
|
||||
'app' => [],
|
||||
'controller' => [],
|
||||
'action' => [],
|
||||
'path' => []
|
||||
],
|
||||
'channel' => 'default' // 日志通道(在config/log.php里配置,默认是default)
|
||||
];
|
||||
@@ -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,12 @@
|
||||
<?php
|
||||
return [
|
||||
'consumer' => [
|
||||
'handler' => Webman\RedisQueue\Process\Consumer::class,
|
||||
'count' => getenv('REDIS_QUEUE_PROCESS_COUNT'), // 可以设置多进程同时消费
|
||||
'constructor' => [
|
||||
// 消费者类目录
|
||||
'consumer_dir' => app_path() . '/queue/redis',
|
||||
'consumer_dir' => app_path() . getenv('REDIS_QUEUE_CONSUMER_DIR')
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
return [
|
||||
'default' => [
|
||||
// 'host' => 'redis://127.0.0.1:6379',
|
||||
'host' => getenv('REDIS_QUEUE_HOST'),
|
||||
'options' => [
|
||||
'auth' => getenv('REDIS_QUEUE_AUTH'), // 密码,字符串类型,可选参数
|
||||
'db' => getenv('REDIS_QUEUE_DB'), // 数据库
|
||||
'prefix' => getenv('REDIS_QUEUE_PREFIX'), // key 前缀
|
||||
'max_attempts' => getenv('REDIS_QUEUE_MAX_ATTEMPTS'), // 消费失败后,重试次数
|
||||
'retry_seconds' => getenv('REDIS_QUEUE_RETRY_SECONDS'), // 重试间隔,单位秒
|
||||
],
|
||||
// Connection pool, supports only Swoole or Swow drivers.
|
||||
'pool' => [
|
||||
'max_connections' => 5,
|
||||
'min_connections' => 1,
|
||||
'wait_timeout' => 3,
|
||||
'idle_timeout' => 60,
|
||||
'heartbeat_interval' => 50,
|
||||
]
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user