$basePath = dirname(dirname(dirname(dirname(__DIR__))));
$params = require(__DIR__ . '/params.php');
$aliases = require(__DIR__ . '/aliases.php');
$db = require(__DIR__ . '/db.php');
return [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log', 'coalmar\delivery\Bootstrap'],
'controllerNamespace' => 'app\commands',
'controllerMap' => [
'migrate' => 'dmstr\console\controllers\MigrateController',
],
'modules' => [
......
],
'components' =>
[
'i18n' => [
'translations' => require 'translations.php',
],
'cache' => [
'class' => 'yii\caching\FileCache',
'fileMode' => 0666,
],
'log' => [
'traceLevel' => getenv('YII_TRACE_LEVEL'),
'targets' => [
[
'class' => 'yii\log\FileTarget',
// 'prefix' => function () {
// return '[console]';
// },
'levels' => YII_DEBUG ? ['error', 'warning', 'info'] : ['error', 'warning'],
'logFile' => $basePath . '/runtime/logs/console.log',
'dirMode' => 0777,
'exportInterval' => 1, // <-- and here
],
[
'class' => 'yii\log\EmailTarget',
'levels' => ['error', 'warning'],
'message' => [
'from' => ['aaaa@aaaa.lv'],
'to' => ['fffff@gmail.com'],
'subject' => 'Errors COALMAR',
],
],
],
],
'db' => $db,
'authManager' => [
'class' => 'yii2d3\d3persons\components\D3AuthManager',
],
],
'aliases' => array_merge($aliases, [
'@vendor' => rtrim($basePath, '\\/') . '/vendor',
]),
'params' => array_merge($params,[
'yii.migrations' => [
'@dektrium/yii2-user/migrations',
'@yii/rbac/migrations',
'@vendor/d3yii2/d3files/migrations',
'@vendor/cornernote/yii2-dashboard/src/migrations',
]
]),
];