Skip to content

Commit

Permalink
Add support for reading commonly changed config from env vars
Browse files Browse the repository at this point in the history
Also added App.default_locale.

Refs #224
  • Loading branch information
josegonzalez committed Jan 17, 2016
1 parent fc9ce3b commit ad6110f
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions config/app.default.php
Expand Up @@ -9,7 +9,7 @@
* Development Mode:
* true: Errors and warnings shown.
*/
'debug' => true,
'debug' => env('DEBUG', true),

/**
* Configure basic information about the application.
Expand Down Expand Up @@ -37,7 +37,8 @@
*/
'App' => [
'namespace' => 'App',
'encoding' => 'UTF-8',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'default_locale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
Expand All @@ -62,7 +63,7 @@
* You should treat it as extremely sensitive data.
*/
'Security' => [
'salt' => '__SALT__',
'salt' => env('SECURITY_SALT', '__SALT__'),
],

/**
Expand All @@ -84,6 +85,7 @@
'default' => [
'className' => 'File',
'path' => CACHE,
'url' => env('CACHE_DEFAULT_URL', null),
],

/**
Expand All @@ -97,6 +99,7 @@
'path' => CACHE . 'persistent/',
'serialize' => true,
'duration' => '+2 minutes',
'url' => env('CACHE_CAKECORE_URL', null),
],

/**
Expand All @@ -111,6 +114,7 @@
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+2 minutes',
'url' => env('CACHE_CAKEMODEL_URL', null),
],
],

Expand Down Expand Up @@ -178,6 +182,7 @@
'password' => 'secret',
'client' => null,
'tls' => null,
'url' => env('EMAILTRANSPORT_DEFAULT_URL', null),
],
],

Expand Down Expand Up @@ -244,6 +249,8 @@
* which is the recommended value in production environments
*/
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],

'url' => env('DATABASE_URL', null),
],

/**
Expand All @@ -264,6 +271,7 @@
'quoteIdentifiers' => false,
'log' => false,
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
'url' => env('TEST_DATABASE_URL', null),
],
],

Expand All @@ -276,12 +284,14 @@
'path' => LOGS,
'file' => 'debug',
'levels' => ['notice', 'info', 'debug'],
'url' => env('LOG_DEBUG_URL', null),
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'url' => env('LOG_ERROR_URL', null),
],
],

Expand Down

0 comments on commit ad6110f

Please sign in to comment.