From 24a75ec29c3763762d66e81228ef74f43d02efa6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-BC3NEC6\\chiefsoft" Date: Fri, 17 Mar 2023 22:59:05 -0400 Subject: [PATCH] env remove --- .env | 8 ++++---- app/Config/Boot/development.php | 9 ++++++++- app/Config/Boot/production.php | 10 +++++++++- app/Config/Boot/testing.php | 10 +++++++++- app/Config/Database.php | 8 ++++---- .env.production => env.production | 10 +++++----- 6 files changed, 39 insertions(+), 16 deletions(-) rename .env.production => env.production (63%) diff --git a/.env b/.env index a5710e8..bc4cdce 100644 --- a/.env +++ b/.env @@ -9,7 +9,7 @@ MYSQL_DATABASE=codeigniter_db HOME_PAGE_BACKGROUND='api_bk.jpg' -MYFIT_DATABASE_HOSTNAME='10.20.30.60' -MYFIT_DATABASE_USERNAME='myfit' -MYFIT_DATABASE_PASSWORD='myfit' -MYFIT_DATABASE='myfit_dev' \ No newline at end of file +# MYFIT_DATABASE_HOSTNAME='10.20.30.60' +# MYFIT_DATABASE_USERNAME='myfit' +# MYFIT_DATABASE_PASSWORD='myfit' +# MYFIT_DATABASE='myfit_dev' \ No newline at end of file diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php index a106c56..a054eec 100644 --- a/app/Config/Boot/development.php +++ b/app/Config/Boot/development.php @@ -31,4 +31,11 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true); */ defined('CI_DEBUG') || define('CI_DEBUG', true); -define('ENV_ID', 'DEV20231703-A2'); \ No newline at end of file +define('ENV_ID', 'DEV20231703-A2'); +define('HOME_PAGE_BACKGROUND', 'api_bk.jpg'); + + +define('MYFIT_DATABASE_HOSTNAME', '10.20.30.60'); +define('MYFIT_DATABASE_USERNAME', 'myfit'); +define('MYFIT_DATABASE_PASSWORD', 'myfit'); +define('MYFIT_DATABASE', 'myfit_dev'); \ No newline at end of file diff --git a/app/Config/Boot/production.php b/app/Config/Boot/production.php index 25c7910..a4707cd 100644 --- a/app/Config/Boot/production.php +++ b/app/Config/Boot/production.php @@ -20,4 +20,12 @@ error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & */ defined('CI_DEBUG') || define('CI_DEBUG', false); -define('ENV_ID', 'PROD20231703-A2'); \ No newline at end of file +define('ENV_ID', 'PROD20231703-A2'); +define('HOME_PAGE_BACKGROUND', 'api_bk.jpg'); + + +define('MYFIT_DATABASE_HOSTNAME', '172.31.4.60'); +define('MYFIT_DATABASE_USERNAME', 'myfit'); +define('MYFIT_DATABASE_PASSWORD', 'myfit'); +define('MYFIT_DATABASE', 'myfit_prod'); + diff --git a/app/Config/Boot/testing.php b/app/Config/Boot/testing.php index e8107b6..b25c822 100644 --- a/app/Config/Boot/testing.php +++ b/app/Config/Boot/testing.php @@ -31,4 +31,12 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true); */ defined('CI_DEBUG') || define('CI_DEBUG', true); -define('ENV_ID', 'TEST20231703-A2'); \ No newline at end of file +define('ENV_ID', 'TEST20231703-A2'); + +define('HOME_PAGE_BACKGROUND', 'api_bk.jpg'); + + +define('MYFIT_DATABASE_HOSTNAME', '10.20.30.60'); +define('MYFIT_DATABASE_USERNAME', 'myfit'); +define('MYFIT_DATABASE_PASSWORD', 'myfit'); +define('MYFIT_DATABASE', 'myfit_dev'); diff --git a/app/Config/Database.php b/app/Config/Database.php index 01a406d..f041a88 100644 --- a/app/Config/Database.php +++ b/app/Config/Database.php @@ -167,9 +167,9 @@ class Database extends Config if (ENVIRONMENT === 'testing') { $this->defaultGroup = 'tests'; } - $this->myfit['hostname'] = getenv('MYFIT_DATABASE_HOSTNAME'); - $this->myfit['username'] = getenv('MYFIT_DATABASE_USERNAME'); - $this->myfit['password'] = getenv('MYFIT_DATABASE_PASSWORD'); - $this->myfit['database'] = getenv('MYFIT_DATABASE'); + $this->myfit['hostname'] = MYFIT_DATABASE_HOSTNAME; //getenv('MYFIT_DATABASE_HOSTNAME'); + $this->myfit['username'] = MYFIT_DATABASE_USERNAME; // getenv('MYFIT_DATABASE_USERNAME'); + $this->myfit['password'] = MYFIT_DATABASE_PASSWORD; // getenv('MYFIT_DATABASE_PASSWORD'); + $this->myfit['database'] = MYFIT_DATABASE; // getenv('MYFIT_DATABASE'); } } diff --git a/.env.production b/env.production similarity index 63% rename from .env.production rename to env.production index b89d246..f314e3b 100644 --- a/.env.production +++ b/env.production @@ -1,7 +1,7 @@ #-------------------------------------------------------------------- # ENVIRONMENT #-------------------------------------------------------------------- -ENV_ID='LIV20231703-00' +# ENV_ID='LIV20231703-00' #CI_ENVIRONMENT = production UID=1000 MYSQL_ROOT_PASSWORD=cod31gn1t3 @@ -9,7 +9,7 @@ MYSQL_DATABASE=codeigniter_db HOME_PAGE_BACKGROUND='api_bk.jpg' -MYFIT_DATABASE_HOSTNAME='172.31.4.60' -MYFIT_DATABASE_USERNAME='myfit' -MYFIT_DATABASE_PASSWORD='myfit' -MYFIT_DATABASE='myfit_prod' \ No newline at end of file +# MYFIT_DATABASE_HOSTNAME='172.31.4.60' +# MYFIT_DATABASE_USERNAME='myfit' +# MYFIT_DATABASE_PASSWORD='myfit' +# MYFIT_DATABASE='myfit_prod' \ No newline at end of file