Update the generation of the local.php configuration file with the new environment variable.

pull/86/head
Cédric Bonhomme 2017-12-06 16:01:45 +01:00
parent c89da4370c
commit 1c67f1a57f
1 changed files with 8 additions and 0 deletions

View File

@ -136,6 +136,7 @@ cat > /etc/apache2/sites-enabled/000-default.conf <<EOF
SetEnv APPLICATION_ENV $ENVIRONMENT
SetEnv APP_ENV $APPENV
SetEnv APP_DIR $PATH_TO_MONARC
SetEnv DB_HOST $DBHOST
SetEnv DB_USER $DBUSER_MONARC
SetEnv DB_PASS $DBPASSWORD_MONARC
@ -148,6 +149,13 @@ service apache2 restart > /dev/null 2>&1
echo -e "\n--- Configuration of MONARC data base connection ---\n"
cat > config/autoload/local.php <<EOF
<?php
$appdir = getenv('APP_DIR') ? getenv('APP_DIR') : '$PATH_TO_MONARC';
$string = file_get_contents($appdir.'/package.json');
if($string === FALSE) {
$string = file_get_contents('./package.json');
}
$package_json = json_decode($string, true);
return array(
'doctrine' => array(
'connection' => array(