EVO - config : check if APP_CONF_DIR environment variable has been setted and use it has a basedir for the data folder
parent
7a1c3b7434
commit
f9dd0b7d4b
|
@ -9,8 +9,10 @@ $env = getenv('APP_ENV') ?: 'production';
|
||||||
$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : '';
|
$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : '';
|
||||||
|
|
||||||
$confpaths = [ 'config/autoload/{,*.}{global,local}.php' ];
|
$confpaths = [ 'config/autoload/{,*.}{global,local}.php' ];
|
||||||
|
$datapath = "data";
|
||||||
if( ! empty($appconfdir) ){
|
if( ! empty($appconfdir) ){
|
||||||
$confpaths[] = $appconfdir.'/local.php';
|
$confpaths[] = $appconfdir.'/local.php';
|
||||||
|
$datapath = $appconfdir.'/data';
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
@ -30,7 +32,7 @@ return array(
|
||||||
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
|
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
|
||||||
'module_map_cache_enabled' => ($env == 'production'),
|
'module_map_cache_enabled' => ($env == 'production'),
|
||||||
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
|
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
|
||||||
'cache_dir' => 'data/cache/',
|
'cache_dir' => $datapath.'/cache/',
|
||||||
'check_dependencies' => ($env != 'production'),
|
'check_dependencies' => ($env != 'production'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,6 +10,14 @@
|
||||||
* control, so do not include passwords or other sensitive information in this
|
* control, so do not include passwords or other sensitive information in this
|
||||||
* file.
|
* file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : '';
|
||||||
|
|
||||||
|
$datapath = "data";
|
||||||
|
if( ! empty($appconfdir) ){
|
||||||
|
$datapath = $appconfdir.'/data';
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
// DOCTRINE CONF
|
// DOCTRINE CONF
|
||||||
'service_manager' => array(
|
'service_manager' => array(
|
||||||
|
@ -87,7 +95,7 @@ return array(
|
||||||
'result_cache' => 'mycache',
|
'result_cache' => 'mycache',
|
||||||
'driver' => 'orm_default', // This driver will be defined later
|
'driver' => 'orm_default', // This driver will be defined later
|
||||||
'generate_proxies' => true,
|
'generate_proxies' => true,
|
||||||
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
|
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
|
||||||
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
||||||
'filters' => array(),
|
'filters' => array(),
|
||||||
'datetime_functions' => array(),
|
'datetime_functions' => array(),
|
||||||
|
@ -102,7 +110,7 @@ return array(
|
||||||
'result_cache' => 'mycache',
|
'result_cache' => 'mycache',
|
||||||
'driver' => 'orm_cli', // This driver will be defined later
|
'driver' => 'orm_cli', // This driver will be defined later
|
||||||
'generate_proxies' => true,
|
'generate_proxies' => true,
|
||||||
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
|
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
|
||||||
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
||||||
'filters' => array(),
|
'filters' => array(),
|
||||||
'datetime_functions' => array(),
|
'datetime_functions' => array(),
|
||||||
|
|
Loading…
Reference in New Issue