From 72619922bfcf70b89d08ab461ea84c7817d333d2 Mon Sep 17 00:00:00 2001 From: samilliken Date: Sun, 14 Oct 2018 14:49:40 -0400 Subject: [PATCH] Added in checks for existence of environment variable, and if so, use them for the configuration instead of the values in the db.inc.php file. Fixed #1084 --- db.inc.php-dist | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/db.inc.php-dist b/db.inc.php-dist index c4705ff76..5beece309 100644 --- a/db.inc.php-dist +++ b/db.inc.php-dist @@ -9,13 +9,11 @@ } // Set to true if you want to skip the installer check - $devMode = false; - - $dbhost = 'localhost'; - $dbport = '3306'; - $dbname = 'dcim'; - $dbuser = 'dcim'; - $dbpass = 'dcim'; + $devMode = getenv('OPENDCIM_DEBUG') ? getenv('OPENMDCIM_DEBUG'):false; + $dbhost = getenv('OPENDCIM_DB_HOST') ? getenv('OPENDCIM_DB_HOST'):'localhost'; + $dbname = getenv('OPENDCIM_DB_NAME') ? getenv('OPENDCIM_DB_NAME'):'dcim'; + $dbuser = getenv('OPENDCIM_DB_USER') ? getenv('OPENDCIM_DB_USER'):'dcim'; + $dbpass = getenv('OPENDCIM_DB_PASS') ? getenv('OPENDCIM_DB_PASS'):'dcim'; $locale = "en_US"; $codeset = "UTF-8";