2016-01-02 16:43:18 +03:00
|
|
|
<?php
|
|
|
|
return [
|
2018-03-17 19:13:12 +03:00
|
|
|
'version' => '{{PLACE_VERSION_HERE}}', // This will be replaced by build tool
|
2017-09-19 20:06:16 +03:00
|
|
|
'vendorPath' => dirname(__DIR__, 2) . '/vendor',
|
2019-02-20 22:58:52 +03:00
|
|
|
'aliases' => [
|
|
|
|
'@bower' => '@vendor/bower-asset',
|
|
|
|
'@npm' => '@vendor/npm-asset',
|
|
|
|
|
|
|
|
'@root' => dirname(__DIR__, 2),
|
|
|
|
'@api' => '@root/api',
|
|
|
|
'@common' => '@root/common',
|
|
|
|
'@console' => '@root/console',
|
|
|
|
],
|
|
|
|
'params' => [
|
2019-12-04 13:24:30 +03:00
|
|
|
'fromEmail' => 'account@ely.by',
|
2019-02-20 22:58:52 +03:00
|
|
|
'supportEmail' => 'support@ely.by',
|
|
|
|
],
|
|
|
|
'container' => [
|
|
|
|
'definitions' => [
|
|
|
|
GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class,
|
2019-05-09 04:23:49 +03:00
|
|
|
Ely\Mojang\Api::class => Ely\Mojang\Api::class,
|
2019-12-29 17:55:21 +03:00
|
|
|
common\components\SkinsSystemApi::class => common\components\SkinsSystemApi::class,
|
2019-02-20 22:58:52 +03:00
|
|
|
],
|
|
|
|
],
|
2016-01-02 16:43:18 +03:00
|
|
|
'components' => [
|
|
|
|
'cache' => [
|
2018-07-08 18:20:19 +03:00
|
|
|
'class' => yii\redis\Cache::class,
|
2016-01-02 16:43:18 +03:00
|
|
|
],
|
|
|
|
'db' => [
|
2016-07-17 19:13:40 +03:00
|
|
|
'class' => yii\db\Connection::class,
|
2016-12-04 15:34:32 +03:00
|
|
|
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
|
|
|
'username' => getenv('DB_USER'),
|
|
|
|
'password' => getenv('DB_PASSWORD'),
|
2018-01-12 13:50:19 +03:00
|
|
|
'charset' => 'utf8mb4',
|
2016-09-21 11:12:40 +03:00
|
|
|
'schemaMap' => [
|
|
|
|
'mysql' => common\db\mysql\Schema::class,
|
|
|
|
],
|
2016-01-02 16:43:18 +03:00
|
|
|
],
|
2017-11-15 00:03:38 +03:00
|
|
|
'unbufferedDb' => [
|
|
|
|
'class' => yii\db\Connection::class,
|
|
|
|
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
|
|
|
'username' => getenv('DB_USER'),
|
|
|
|
'password' => getenv('DB_PASSWORD'),
|
2018-01-12 13:50:19 +03:00
|
|
|
'charset' => 'utf8mb4',
|
2017-11-15 00:03:38 +03:00
|
|
|
'attributes' => [
|
|
|
|
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
|
|
|
|
],
|
|
|
|
'schemaMap' => [
|
|
|
|
'mysql' => common\db\mysql\Schema::class,
|
|
|
|
],
|
|
|
|
],
|
2016-01-02 16:43:18 +03:00
|
|
|
'mailer' => [
|
2016-07-17 19:13:40 +03:00
|
|
|
'class' => yii\swiftmailer\Mailer::class,
|
2016-01-02 16:43:18 +03:00
|
|
|
'viewPath' => '@common/mail',
|
2016-12-04 15:34:32 +03:00
|
|
|
'transport' => [
|
|
|
|
'class' => Swift_SmtpTransport::class,
|
2019-12-29 17:59:58 +03:00
|
|
|
'host' => getenv('SMTP_HOST'),
|
2016-12-04 15:34:32 +03:00
|
|
|
'username' => getenv('SMTP_USER'),
|
|
|
|
'password' => getenv('SMTP_PASS'),
|
|
|
|
'port' => getenv('SMTP_PORT') ?: 587,
|
2019-12-29 17:59:58 +03:00
|
|
|
'encryption' => getenv('SMTP_ENCRYPTION') ?: 'tls',
|
2016-12-04 15:34:32 +03:00
|
|
|
],
|
2016-01-02 16:43:18 +03:00
|
|
|
],
|
2016-11-22 01:47:41 +03:00
|
|
|
'sentry' => [
|
2019-12-29 17:55:21 +03:00
|
|
|
'class' => common\components\Sentry::class,
|
2016-12-02 00:23:40 +03:00
|
|
|
'enabled' => !empty(getenv('SENTRY_DSN')),
|
|
|
|
'dsn' => getenv('SENTRY_DSN'),
|
2016-11-22 01:47:41 +03:00
|
|
|
'environment' => YII_ENV_DEV ? 'development' : 'production',
|
|
|
|
'client' => [
|
|
|
|
'curl_method' => 'async',
|
|
|
|
],
|
|
|
|
],
|
2016-01-03 03:18:37 +03:00
|
|
|
'security' => [
|
|
|
|
'passwordHashStrategy' => 'password_hash',
|
2016-02-14 20:50:10 +03:00
|
|
|
],
|
|
|
|
'redis' => [
|
2018-07-08 18:20:19 +03:00
|
|
|
'class' => yii\redis\Connection::class,
|
2016-12-04 15:34:32 +03:00
|
|
|
'hostname' => getenv('REDIS_HOST') ?: 'redis',
|
|
|
|
'password' => getenv('REDIS_PASS') ?: null,
|
|
|
|
'port' => getenv('REDIS_PORT') ?: 6379,
|
|
|
|
'database' => getenv('REDIS_DATABASE') ?: 0,
|
2016-02-14 20:50:10 +03:00
|
|
|
],
|
2016-09-06 12:56:39 +03:00
|
|
|
'guzzle' => [
|
2016-09-16 01:28:28 +03:00
|
|
|
'class' => GuzzleHttp\Client::class,
|
2016-09-06 12:56:39 +03:00
|
|
|
],
|
2019-06-07 02:16:13 +03:00
|
|
|
'emailsRenderer' => [
|
|
|
|
'class' => common\components\EmailsRenderer\Component::class,
|
2019-12-04 13:24:30 +03:00
|
|
|
'serviceUrl' => getenv('EMAILS_RENDERER_HOST') ?: 'http://emails-renderer:3000',
|
2016-10-02 12:52:17 +03:00
|
|
|
'basePath' => '/images/emails',
|
|
|
|
],
|
2017-09-19 20:06:16 +03:00
|
|
|
'authManager' => [
|
2019-08-02 03:29:20 +03:00
|
|
|
'class' => \api\rbac\Manager::class,
|
2019-08-02 03:36:24 +03:00
|
|
|
'itemFile' => '@api/rbac/.generated/items.php',
|
|
|
|
'ruleFile' => '@api/rbac/.generated/rules.php',
|
2017-09-19 20:06:16 +03:00
|
|
|
],
|
2017-11-16 19:55:00 +03:00
|
|
|
'statsd' => [
|
|
|
|
'class' => common\components\StatsD::class,
|
|
|
|
'host' => getenv('STATSD_HOST'),
|
|
|
|
'port' => getenv('STATSD_PORT') ?: 8125,
|
|
|
|
'namespace' => getenv('STATSD_NAMESPACE') ?: 'ely.accounts.' . gethostname() . '.app',
|
|
|
|
],
|
2017-11-26 04:44:41 +03:00
|
|
|
'queue' => [
|
2018-07-08 18:20:19 +03:00
|
|
|
'class' => yii\queue\redis\Queue::class,
|
2017-11-26 04:44:41 +03:00
|
|
|
],
|
2016-01-02 16:43:18 +03:00
|
|
|
],
|
|
|
|
];
|