| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- $params = require __DIR__ . '/params.php';
- $db = require __DIR__ . '/db.php';
- $config = [
- 'id' => 'basic-console',
- 'basePath' => dirname(__DIR__),
- 'bootstrap' => ['log'],
- 'controllerNamespace' => 'app\commands',
- 'aliases' => [
- '@bower' => '@vendor/bower-asset',
- '@npm' => '@vendor/npm-asset',
- '@tests' => '@app/tests',
- ],
- 'components' => [
- 'cache' => [
- 'class' => 'yii\caching\FileCache',
- ],
- 'log' => [
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'mailer' => [
- 'class' => 'yii\swiftmailer\Mailer',
- // 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' => false,
- 'transport' => [
- 'class' => 'Swift_SmtpTransport',
- 'host' => $_ENV['SMTP_HOST'],
- 'username' => $_ENV['SMTP_LOGIN'],
- 'password' => $_ENV['SMTP_PASS'],
- 'port' => $_ENV['SMTP_PORT'],
- 'encryption' => $_ENV['SMTP_ENC'],
- ],
- ],
- 'db' => $db,
- ],
- 'modules' => [
- 'user' => [
- 'class' => 'dektrium\user\Module',
- 'enableRegistration' => false,
- 'enablePasswordRecovery' => false,
- 'enableConfirmation' => false,
- ],
- ],
- 'params' => $params,
- /*
- 'controllerMap' => [
- 'fixture' => [ // Fixture generation command line.
- 'class' => 'yii\faker\FixtureController',
- ],
- ],
- */
- ];
- if (YII_ENV_DEV) {
- // configuration adjustments for 'dev' environment
- $config['bootstrap'][] = 'gii';
- $config['modules']['gii'] = [
- 'class' => 'yii\gii\Module',
- ];
- }
- return $config;
|