diff --git a/config/application.config.php b/config/application.config.php index dc72cd4..81dd130 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -9,8 +9,10 @@ $env = getenv('APP_ENV') ?: 'production'; $appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : ''; $confpaths = [ 'config/autoload/{,*.}{global,local}.php' ]; +$datapath = "data"; if( ! empty($appconfdir) ){ $confpaths[] = $appconfdir.'/local.php'; + $datapath = $appconfdir.'/data'; } return array( 'modules' => array( @@ -29,7 +31,7 @@ return array( 'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc') 'module_map_cache_enabled' => ($env == 'production'), 'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'), - 'cache_dir' => 'data/cache/', + 'cache_dir' => $datapath.'/cache/', 'check_dependencies' => ($env != 'production'), ), ); diff --git a/config/autoload/global.php b/config/autoload/global.php index 647983b..90a92a2 100755 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -10,6 +10,14 @@ * control, so do not include passwords or other sensitive information in this * file. */ + +$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : ''; + +$datapath = "data"; +if( ! empty($appconfdir) ){ + $datapath = $appconfdir.'/data'; +} + return array( // DOCTRINE CONF 'service_manager' => array( @@ -86,7 +94,7 @@ return array( 'result_cache' => 'mycache', 'driver' => 'orm_default', // This driver will be defined later 'generate_proxies' => true, - 'proxy_dir' => 'data/DoctrineORMModule/Proxy', + 'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy', 'proxy_namespace' => 'DoctrineORMModule\Proxy', 'filters' => array(), 'datetime_functions' => array(), @@ -101,7 +109,7 @@ return array( 'result_cache' => 'mycache', 'driver' => 'orm_cli', // This driver will be defined later 'generate_proxies' => true, - 'proxy_dir' => 'data/DoctrineORMModule/Proxy', + 'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy', 'proxy_namespace' => 'DoctrineORMModule\Proxy', 'filters' => array(), 'datetime_functions' => array(), @@ -113,8 +121,8 @@ return array( ), ), - 'spool_path_create' => getcwd() .'/data/json/create/',//default location path where the json file enabling the creation of the environment of the client should be generated - 'spool_path_delete' => getcwd() .'/data/json/delete/', //default location path where the json file enabling the deletion of the environment of the client should be generated + 'spool_path_create' => $datapath.'/json/create/',//default location path where the json file enabling the creation of the environment of the client should be generated + 'spool_path_delete' => $datapath.'/json/delete/', //default location path where the json file enabling the deletion of the environment of the client should be generated // END DOCTRINE CONF ); diff --git a/data/cache/.gitignore b/data/cache/.gitignore deleted file mode 100755 index d6b7ef3..0000000 --- a/data/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore