From 59faa344cb4bbe48b329c1282e2bb08f1fd9c6b3 Mon Sep 17 00:00:00 2001 From: RedHood Date: Sat, 19 Dec 2020 12:57:26 +1000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/skillparts/system/config/.gitignore | 1 + .../system/config/console.php.example | 48 +++++++++++ .../skillparts/system/config/db.php.example | 14 +++ .../system/config/params.php.example | 7 ++ .../skillparts/system/config/test.php.example | 42 +++++++++ .../system/config/test_db.php.example | 6 ++ .../skillparts/system/config/web.php.example | 86 +++++++++++++++++++ 7 files changed, 204 insertions(+) create mode 100644 mirzaev/skillparts/system/config/.gitignore create mode 100644 mirzaev/skillparts/system/config/console.php.example create mode 100644 mirzaev/skillparts/system/config/db.php.example create mode 100644 mirzaev/skillparts/system/config/params.php.example create mode 100644 mirzaev/skillparts/system/config/test.php.example create mode 100644 mirzaev/skillparts/system/config/test_db.php.example create mode 100644 mirzaev/skillparts/system/config/web.php.example diff --git a/mirzaev/skillparts/system/config/.gitignore b/mirzaev/skillparts/system/config/.gitignore new file mode 100644 index 0000000..66ca35b --- /dev/null +++ b/mirzaev/skillparts/system/config/.gitignore @@ -0,0 +1 @@ +*.php \ No newline at end of file diff --git a/mirzaev/skillparts/system/config/console.php.example b/mirzaev/skillparts/system/config/console.php.example new file mode 100644 index 0000000..299656a --- /dev/null +++ b/mirzaev/skillparts/system/config/console.php.example @@ -0,0 +1,48 @@ + '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'], + ], + ], + ], + 'db' => $db, + ], + '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; diff --git a/mirzaev/skillparts/system/config/db.php.example b/mirzaev/skillparts/system/config/db.php.example new file mode 100644 index 0000000..441fe79 --- /dev/null +++ b/mirzaev/skillparts/system/config/db.php.example @@ -0,0 +1,14 @@ + 'yii\db\Connection', + 'dsn' => 'mysql:host=;dbname=', + 'username' => '', + 'password' => '', + 'charset' => 'utf8', + + // Schema cache options (for production environment) + //'enableSchemaCache' => true, + //'schemaCacheDuration' => 60, + //'schemaCache' => 'cache', +]; diff --git a/mirzaev/skillparts/system/config/params.php.example b/mirzaev/skillparts/system/config/params.php.example new file mode 100644 index 0000000..981c621 --- /dev/null +++ b/mirzaev/skillparts/system/config/params.php.example @@ -0,0 +1,7 @@ + 'admin@example.com', + 'senderEmail' => 'noreply@example.com', + 'senderName' => 'Example.com mailer', +]; diff --git a/mirzaev/skillparts/system/config/test.php.example b/mirzaev/skillparts/system/config/test.php.example new file mode 100644 index 0000000..f95bc03 --- /dev/null +++ b/mirzaev/skillparts/system/config/test.php.example @@ -0,0 +1,42 @@ + 'basic-tests', + 'basePath' => dirname(__DIR__), + 'aliases' => [ + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', + ], + 'language' => 'en-US', + 'components' => [ + 'db' => $db, + 'mailer' => [ + 'useFileTransport' => true, + ], + 'assetManager' => [ + 'basePath' => __DIR__ . '/../web/assets', + ], + 'urlManager' => [ + 'showScriptName' => true, + ], + 'user' => [ + 'identityClass' => 'app\models\User', + ], + 'request' => [ + 'cookieValidationKey' => 'test', + 'enableCsrfValidation' => false, + // but if you absolutely need it set cookie domain to localhost + /* + 'csrfCookie' => [ + 'domain' => 'localhost', + ], + */ + ], + ], + 'params' => $params, +]; diff --git a/mirzaev/skillparts/system/config/test_db.php.example b/mirzaev/skillparts/system/config/test_db.php.example new file mode 100644 index 0000000..f4290e0 --- /dev/null +++ b/mirzaev/skillparts/system/config/test_db.php.example @@ -0,0 +1,6 @@ + 'basic', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'aliases' => [ + '@vendor' => '../../../../vendor', + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', + ], + 'components' => [ + 'request' => [ + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation + 'cookieValidationKey' => '', + ], + // 'cache' => [ + // 'class' => 'yii\caching\FileCache', + // ], + 'user' => [ + 'identityClass' => 'app\models\User', + 'enableAutoLogin' => true, + ], + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + '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' => true, + ], + 'log' => [ + 'traceLevel' => YII_DEBUG ? 3 : 0, + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => $db, + 'arangodb' => [ + 'class' => '\explosivebit\arangodb\Connection', + 'connectionOptions' => [ + ConnectionOptions::OPTION_DATABASE => '', + ConnectionOptions::OPTION_ENDPOINT => '', + ConnectionOptions::OPTION_AUTH_TYPE => 'Basic', + ConnectionOptions::OPTION_AUTH_USER => '', + ConnectionOptions::OPTION_AUTH_PASSWD => '', + ], + ], + 'urlManager' => [ + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [], + ], + + ], + 'params' => $params, +]; + +if (YII_ENV_DEV) { + // configuration adjustments for 'dev' environment + $config['bootstrap'][] = 'debug'; + $config['modules']['debug'] = [ + 'class' => 'yii\debug\Module', + // uncomment the following to add your IP if you are not connecting from localhost. + //'allowedIPs' => ['127.0.0.1', '::1'], + ]; + + $config['bootstrap'][] = 'gii'; + $config['modules']['gii'] = [ + 'class' => 'yii\gii\Module', + // uncomment the following to add your IP if you are not connecting from localhost. + //'allowedIPs' => ['127.0.0.1', '::1'], + ]; +} + +return $config;