From c3580ea2f8f3e8eda7cc5ce0a3a6afbaef0fb29c Mon Sep 17 00:00:00 2001 From: Cyril Rouyer Date: Fri, 10 Mar 2017 14:03:35 +0100 Subject: [PATCH] EVO - config : Allow customization of the config file location path --- config/application.config.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/application.config.php b/config/application.config.php index b7e2a90..dc72cd4 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -6,6 +6,12 @@ * @see https://github.com/zendframework/ZFTool */ $env = getenv('APP_ENV') ?: 'production'; +$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : ''; + +$confpaths = [ 'config/autoload/{,*.}{global,local}.php' ]; +if( ! empty($appconfdir) ){ + $confpaths[] = $appconfdir.'/local.php'; +} return array( 'modules' => array( 'DoctrineModule', @@ -18,9 +24,7 @@ return array( './module', './vendor' ), - 'config_glob_paths' => array( - 'config/autoload/{,*.}{global,local}.php' - ), + 'config_glob_paths' => $confpaths, 'config_cache_enabled' => ($env == 'production'), 'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc') 'module_map_cache_enabled' => ($env == 'production'),