2016-01-02 19:13:18 +05:30
|
|
|
<?php
|
2024-12-02 15:40:55 +05:30
|
|
|
|
2016-01-02 19:13:18 +05:30
|
|
|
return [
|
2018-03-17 21:43:12 +05:30
|
|
|
'version' => '{{PLACE_VERSION_HERE}}', // This will be replaced by build tool
|
2017-09-19 22:36:16 +05:30
|
|
|
'vendorPath' => dirname(__DIR__, 2) . '/vendor',
|
2019-02-21 01:28:52 +05:30
|
|
|
'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 15:54:30 +05:30
|
|
|
'fromEmail' => 'account@ely.by',
|
2019-02-21 01:28:52 +05:30
|
|
|
'supportEmail' => 'support@ely.by',
|
|
|
|
],
|
|
|
|
'container' => [
|
2021-03-03 19:34:42 +05:30
|
|
|
'singletons' => [
|
2019-02-21 01:28:52 +05:30
|
|
|
GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class,
|
2019-05-09 06:53:49 +05:30
|
|
|
Ely\Mojang\Api::class => Ely\Mojang\Api::class,
|
2021-03-04 10:28:07 +05:30
|
|
|
common\components\SkinsSystemApi::class => [
|
|
|
|
'class' => common\components\SkinsSystemApi::class,
|
2021-03-04 12:28:44 +05:30
|
|
|
'__construct()' => [
|
|
|
|
'http://' . (getenv('CHRLY_HOST') ?: 'skinsystem.ely.by'),
|
|
|
|
],
|
2021-03-04 10:28:07 +05:30
|
|
|
],
|
2024-12-06 06:04:09 +05:30
|
|
|
League\OAuth2\Server\AuthorizationServer::class => common\components\OAuth2\AuthorizationServerFactory::build(...),
|
2019-02-21 01:28:52 +05:30
|
|
|
],
|
|
|
|
],
|
2016-01-02 19:13:18 +05:30
|
|
|
'components' => [
|
|
|
|
'cache' => [
|
2018-07-08 20:50:19 +05:30
|
|
|
'class' => yii\redis\Cache::class,
|
2016-01-02 19:13:18 +05:30
|
|
|
],
|
|
|
|
'db' => [
|
2016-07-17 21:43:40 +05:30
|
|
|
'class' => yii\db\Connection::class,
|
2016-12-04 18:04:32 +05:30
|
|
|
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
|
|
|
'username' => getenv('DB_USER'),
|
|
|
|
'password' => getenv('DB_PASSWORD'),
|
2018-01-12 16:20:19 +05:30
|
|
|
'charset' => 'utf8mb4',
|
2016-09-21 13:42:40 +05:30
|
|
|
'schemaMap' => [
|
|
|
|
'mysql' => common\db\mysql\Schema::class,
|
|
|
|
],
|
2016-01-02 19:13:18 +05:30
|
|
|
],
|
2017-11-15 02:33:38 +05:30
|
|
|
'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 16:20:19 +05:30
|
|
|
'charset' => 'utf8mb4',
|
2017-11-15 02:33:38 +05:30
|
|
|
'attributes' => [
|
|
|
|
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
|
|
|
|
],
|
|
|
|
'schemaMap' => [
|
|
|
|
'mysql' => common\db\mysql\Schema::class,
|
|
|
|
],
|
|
|
|
],
|
2016-01-02 19:13:18 +05:30
|
|
|
'mailer' => [
|
2024-12-02 15:40:55 +05:30
|
|
|
'class' => yii\symfonymailer\Mailer::class,
|
2016-01-02 19:13:18 +05:30
|
|
|
'viewPath' => '@common/mail',
|
2016-12-04 18:04:32 +05:30
|
|
|
'transport' => [
|
2024-12-02 18:29:36 +05:30
|
|
|
'scheme' => 'smtp',
|
2019-12-29 20:29:58 +05:30
|
|
|
'host' => getenv('SMTP_HOST'),
|
2016-12-04 18:04:32 +05:30
|
|
|
'username' => getenv('SMTP_USER'),
|
|
|
|
'password' => getenv('SMTP_PASS'),
|
2024-12-02 18:53:43 +05:30
|
|
|
'port' => (int)(getenv('SMTP_PORT') ?: 587),
|
2019-12-29 20:29:58 +05:30
|
|
|
'encryption' => getenv('SMTP_ENCRYPTION') ?: 'tls',
|
2016-12-04 18:04:32 +05:30
|
|
|
],
|
2016-01-02 19:13:18 +05:30
|
|
|
],
|
2016-11-22 04:17:41 +05:30
|
|
|
'sentry' => [
|
2019-12-29 20:25:21 +05:30
|
|
|
'class' => common\components\Sentry::class,
|
2016-12-02 02:53:40 +05:30
|
|
|
'enabled' => !empty(getenv('SENTRY_DSN')),
|
|
|
|
'dsn' => getenv('SENTRY_DSN'),
|
2020-06-10 20:45:19 +05:30
|
|
|
'environment' => (function(): string {
|
|
|
|
if (!empty(getenv('SENTRY_ENV'))) {
|
|
|
|
return getenv('SENTRY_ENV');
|
|
|
|
}
|
|
|
|
|
|
|
|
return YII_ENV_DEV ? 'Development' : 'Production';
|
|
|
|
})(),
|
2016-11-22 04:17:41 +05:30
|
|
|
],
|
2016-01-03 05:48:37 +05:30
|
|
|
'security' => [
|
|
|
|
'passwordHashStrategy' => 'password_hash',
|
2016-02-14 23:20:10 +05:30
|
|
|
],
|
|
|
|
'redis' => [
|
2018-07-08 20:50:19 +05:30
|
|
|
'class' => yii\redis\Connection::class,
|
2016-12-04 18:04:32 +05:30
|
|
|
'hostname' => getenv('REDIS_HOST') ?: 'redis',
|
|
|
|
'password' => getenv('REDIS_PASS') ?: null,
|
|
|
|
'port' => getenv('REDIS_PORT') ?: 6379,
|
|
|
|
'database' => getenv('REDIS_DATABASE') ?: 0,
|
2016-02-14 23:20:10 +05:30
|
|
|
],
|
2016-09-06 15:26:39 +05:30
|
|
|
'guzzle' => [
|
2016-09-16 03:58:28 +05:30
|
|
|
'class' => GuzzleHttp\Client::class,
|
2016-09-06 15:26:39 +05:30
|
|
|
],
|
2019-06-07 04:46:13 +05:30
|
|
|
'emailsRenderer' => [
|
|
|
|
'class' => common\components\EmailsRenderer\Component::class,
|
2019-12-04 15:54:30 +05:30
|
|
|
'serviceUrl' => getenv('EMAILS_RENDERER_HOST') ?: 'http://emails-renderer:3000',
|
2016-10-02 15:22:17 +05:30
|
|
|
'basePath' => '/images/emails',
|
|
|
|
],
|
2017-09-19 22:36:16 +05:30
|
|
|
'authManager' => [
|
2019-08-02 05:59:20 +05:30
|
|
|
'class' => \api\rbac\Manager::class,
|
2019-08-02 06:06:24 +05:30
|
|
|
'itemFile' => '@api/rbac/.generated/items.php',
|
|
|
|
'ruleFile' => '@api/rbac/.generated/rules.php',
|
2017-09-19 22:36:16 +05:30
|
|
|
],
|
2017-11-16 22:25:00 +05:30
|
|
|
'statsd' => [
|
|
|
|
'class' => common\components\StatsD::class,
|
|
|
|
'host' => getenv('STATSD_HOST'),
|
2024-12-02 15:40:55 +05:30
|
|
|
'port' => (int)getenv('STATSD_PORT') ?: 8125,
|
2017-11-16 22:25:00 +05:30
|
|
|
'namespace' => getenv('STATSD_NAMESPACE') ?: 'ely.accounts.' . gethostname() . '.app',
|
|
|
|
],
|
2017-11-26 07:14:41 +05:30
|
|
|
'queue' => [
|
2018-07-08 20:50:19 +05:30
|
|
|
'class' => yii\queue\redis\Queue::class,
|
2017-11-26 07:14:41 +05:30
|
|
|
],
|
2016-01-02 19:13:18 +05:30
|
|
|
],
|
|
|
|
];
|