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;