Browse Source

Moved commented sections into -local configs, added prod environment

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
4a9f0eed0c
  1. 10
      apps/advanced/backstage/config/main.php
  2. 7
      apps/advanced/console/config/main.php
  3. 14
      apps/advanced/environments/dev/backstage/config/main-local.php
  4. 14
      apps/advanced/environments/dev/frontend/config/main-local.php
  5. 3
      apps/advanced/environments/prod/backstage/config/main-local.php
  6. 3
      apps/advanced/environments/prod/backstage/config/params-local.php
  7. 14
      apps/advanced/environments/prod/backstage/www/index.php
  8. 3
      apps/advanced/environments/prod/common/config/params-local.php
  9. 3
      apps/advanced/environments/prod/console/config/main-local.php
  10. 3
      apps/advanced/environments/prod/console/config/params-local.php
  11. 3
      apps/advanced/environments/prod/frontend/config/main-local.php
  12. 3
      apps/advanced/environments/prod/frontend/config/params-local.php
  13. 15
      apps/advanced/environments/prod/frontend/www/index.php
  14. 25
      apps/advanced/environments/prod/yii
  15. 12
      apps/advanced/frontend/config/main.php

10
apps/advanced/backstage/config/main.php

@ -14,14 +14,9 @@ return array(
'preload' => array('log'), 'preload' => array('log'),
'controllerNamespace' => 'app\controllers', 'controllerNamespace' => 'app\controllers',
'modules' => array( 'modules' => array(
// 'debug' => array(
// 'class' => 'yii\debug\Module',
// )
), ),
'components' => array( 'components' => array(
'cache' => array( 'cache' => $params['components.cache'],
'class' => 'yii\caching\FileCache',
),
'user' => array( 'user' => array(
'class' => 'yii\web\User', 'class' => 'yii\web\User',
'identityClass' => 'app\models\User', 'identityClass' => 'app\models\User',
@ -36,9 +31,6 @@ return array(
'class' => 'yii\logging\FileTarget', 'class' => 'yii\logging\FileTarget',
'levels' => array('error', 'warning'), 'levels' => array('error', 'warning'),
), ),
// array(
// 'class' => 'yii\logging\DebugTarget',
// )
), ),
), ),
), ),

7
apps/advanced/console/config/main.php

@ -9,17 +9,14 @@ $params = array_merge(
); );
return array( return array(
'id' => 'bootstrap-console', 'id' => 'change-me',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'preload' => array('log'), 'preload' => array('log'),
'controllerPath' => dirname(__DIR__) . '/commands',
'controllerNamespace' => 'app\controllers', 'controllerNamespace' => 'app\controllers',
'modules' => array( 'modules' => array(
), ),
'components' => array( 'components' => array(
'cache' => array( 'cache' => $params['components.cache'],
'class' => 'yii\caching\FileCache',
),
'log' => array( 'log' => array(
'class' => 'yii\logging\Router', 'class' => 'yii\logging\Router',
'targets' => array( 'targets' => array(

14
apps/advanced/environments/dev/backstage/config/main-local.php

@ -1,3 +1,17 @@
<?php <?php
return array( return array(
'modules' => array(
// 'debug' => array(
// 'class' => 'yii\debug\Module',
// ),
),
'components' => array(
'log' => array(
'targets' => array(
// array(
// 'class' => 'yii\logging\DebugTarget',
// )
),
),
),
); );

14
apps/advanced/environments/dev/frontend/config/main-local.php

@ -1,3 +1,17 @@
<?php <?php
return array( return array(
'modules' => array(
// 'debug' => array(
// 'class' => 'yii\debug\Module',
// ),
),
'components' => array(
'log' => array(
'targets' => array(
// array(
// 'class' => 'yii\logging\DebugTarget',
// )
),
),
),
); );

3
apps/advanced/environments/prod/backstage/config/main-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

3
apps/advanced/environments/prod/backstage/config/params-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

14
apps/advanced/environments/prod/backstage/www/index.php

@ -0,0 +1,14 @@
<?php
// comment out the following line to disable debug mode
defined('YII_DEBUG') or define('YII_DEBUG', false);
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/autoload.php');
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
require(__DIR__ . '/../config/main-local.php')
);
$application = new yii\web\Application($config);
$application->run();

3
apps/advanced/environments/prod/common/config/params-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

3
apps/advanced/environments/prod/console/config/main-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

3
apps/advanced/environments/prod/console/config/params-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

3
apps/advanced/environments/prod/frontend/config/main-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

3
apps/advanced/environments/prod/frontend/config/params-local.php

@ -0,0 +1,3 @@
<?php
return array(
);

15
apps/advanced/environments/prod/frontend/www/index.php

@ -0,0 +1,15 @@
<?php
// comment out the following line to disable debug mode
defined('YII_DEBUG') or define('YII_DEBUG', false);
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/autoload.php');
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
require(__DIR__ . '/../config/main-local.php')
);
$application = new yii\web\Application($config);
$application->run();

25
apps/advanced/environments/prod/yii

@ -0,0 +1,25 @@
#!/usr/bin/env php
<?php
/**
* Yii console bootstrap file.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') or define('YII_DEBUG', false);
// fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/autoload.php');
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/console/config/main.php'),
require(__DIR__ . '/console/config/main-local.php')
);
$application = new yii\console\Application($config);
$application->run();

12
apps/advanced/frontend/config/main.php

@ -9,19 +9,14 @@ $params = array_merge(
); );
return array( return array(
'id' => 'bootstrap', 'id' => 'change-me',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'preload' => array('log'), 'preload' => array('log'),
'controllerNamespace' => 'app\controllers', 'controllerNamespace' => 'app\controllers',
'modules' => array( 'modules' => array(
// 'debug' => array(
// 'class' => 'yii\debug\Module',
// )
), ),
'components' => array( 'components' => array(
'cache' => array( 'cache' => $params['components.cache'],
'class' => 'yii\caching\FileCache',
),
'user' => array( 'user' => array(
'class' => 'yii\web\User', 'class' => 'yii\web\User',
'identityClass' => 'app\models\User', 'identityClass' => 'app\models\User',
@ -36,9 +31,6 @@ return array(
'class' => 'yii\logging\FileTarget', 'class' => 'yii\logging\FileTarget',
'levels' => array('error', 'warning'), 'levels' => array('error', 'warning'),
), ),
// array(
// 'class' => 'yii\logging\DebugTarget',
// )
), ),
), ),
), ),

Loading…
Cancel
Save