| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- return [
- 'components' => [
- 'db' => [
- 'class' => 'common\replaces\db\Connection',
- 'enableSavepoint' => false,
- 'tablePrefix' => 'qimall_',
- 'commandMap' => [
- 'mysql' => 'common\replaces\Command'
- ],
- 'dsn' => 'mysql:host=mysql_db;port=3306;dbname=qimall',
- 'username' => 'root',
- 'password' => '---mysql_password---',
- 'charset' => 'utf8mb4',
- ],
- 'redis' => [
- 'class' => 'yii\redis\Connection',
- 'hostname' => 'redis_db',
- 'port' => 6379,
- 'password' => '---redis_password---',
- 'retries' => 3,
- 'database' => 0,
- 'connectionTimeout' => 5,
- ],
- 'cache' => [
- 'class' => 'yii\redis\Cache',
- 'keyPrefix' => 'qimallCache:', // 唯一键前缀
- ],
- 'mailer' => [
- 'class' => 'yii\swiftmailer\Mailer',
- 'viewPath' => '@common/mail',
- // send all mails to a file by default. You have to set
- // 'useFileTransport' to false and configure a transport
- // for the mailer to send real emails.
- 'useFileTransport' => true,
- ],
- 'elasticsearch' => [
- 'class' => 'yii\elasticsearch\Connection',
- 'nodes' => [
- ['http_address' => 'es:9200'],
- ],
- 'autodetectCluster' => false,
- ],
- 'rabbitMq' =>[
- 'class' => app\component\lib\RabbitClient::class,
- 'host' => 'rabbitmq',
- 'port' => 5672,
- 'userName' => 'admin',
- 'passWord' => '---rabbitmq_password---',
- 'setting' => [
- 'vhost' => '/',
- 'insist' => false,
- 'login_method'=>'AMQPLAIN',
- 'login_response'=>null,
- 'locale'=>'en_US',
- 'connection_timeout'=>60,
- 'read_write_timeout'=>60,
- 'context'=>null,
- 'keepalive'=>false,
- 'heartbeat'=>30
- ]
- ],
- ],
- ];
|