Environment handling

This commit is contained in:
tokslaw7
2024-09-24 21:28:14 +00:00
parent 3d4c5019a3
commit 764dae4731
12 changed files with 224 additions and 4 deletions
+1
View File
@@ -1,6 +1,7 @@
CONTAINER_PORT=9088
UID=1000
CI_ENV=development
CI_ENVIRONMENT=development
API_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com"
# $arr["host"] = "10.10.10.23";
# $arr["name"] = "wrenchboard";
+1
View File
@@ -1,6 +1,7 @@
CONTAINER_PORT=9088
UID=1000
CI_ENV=development
CI_ENVIRONMENT=development
API_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com"
# $arr["host"] = "10.10.10.23";
# $arr["name"] = "wrenchboard";
+2 -1
View File
@@ -1,6 +1,7 @@
CONTAINER_PORT=9088
UID=1000
CI_ENV=development
CI_ENV=production
CI_ENVIRONMENT=production
API_ENDPOINT="https://apigate.orion.g1.wrenchboard.com"
# $arr["host"] = "10.10.10.23";
# $arr["name"] = "wrenchboard";
+81
View File
@@ -0,0 +1,81 @@
CONTAINER_PORT=9088
UID=1000
CI_ENV=testing
CI_ENVIRONMENT=testing
API_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com"
# $arr["host"] = "10.10.10.23";
# $arr["name"] = "wrenchboard";
# $arr["user"] = "wrenchboard";
# $arr["pass"] = "wrenchboard";
# $arr["port"] = 5432;
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
# CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
# app.baseURL = ''
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = ''
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
# database.default.hostname = localhost
# database.default.database = ci4
# database.default.username = root
# database.default.password = root
# database.default.DBDriver = MySQLi
# database.default.DBPrefix =
# database.default.port = 3306
# If you use MySQLi as tests, first update the values of Config\Database::$tests.
# database.tests.hostname = localhost
# database.tests.database = ci4_test
# database.tests.username = root
# database.tests.password = root
# database.tests.DBDriver = MySQLi
# database.tests.DBPrefix =
# database.tests.charset = utf8mb4
# database.tests.DBCollat = utf8mb4_general_ci
# database.tests.port = 3306
#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
# encryption.key =
#--------------------------------------------------------------------
# SESSION
#--------------------------------------------------------------------
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
# session.savePath = null
#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
# logger.threshold = 4
+130
View File
@@ -3,3 +3,133 @@ apache_log
apache_log/*
apache_log*
#-------------------------
# Operating Specific Junk Files
#-------------------------
# OS X
.DS_Store
.AppleDouble
.LSOverride
# OS X Thumbnails
._*
# Windows image file caches
Thumbs.db
ehthumbs.db
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# Linux
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
#-------------------------
# Environment Files
#-------------------------
# These should never be under version control,
# as it poses a security risk.
.env
.vagrant
Vagrantfile
#-------------------------
# Temporary Files
#-------------------------
writable/cache/*
!writable/cache/index.html
writable/logs/*
!writable/logs/index.html
writable/session/*
!writable/session/index.html
writable/uploads/*
!writable/uploads/index.html
writable/debugbar/*
!writable/debugbar/index.html
writable/**/*.db
writable/**/*.sqlite
php_errors.log
#-------------------------
# User Guide Temp Files
#-------------------------
user_guide_src/build/*
#-------------------------
# Test Files
#-------------------------
tests/coverage*
# Don't save phpunit under version control.
phpunit
#-------------------------
# Composer
#-------------------------
vendor/
composer.lock
#-------------------------
# IDE / Development Files
#-------------------------
# Modules Testing
_modules/*
# phpenv local config
.php-version
# Jetbrains editors (PHPStorm, etc)
.idea/
*.iml
# Netbeans
nbproject/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
# Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
.phpintel
/api/
# Visual Studio Code
.vscode/
/results/
/phpunit*.xml
/.php-cs-fixer.php
-2
View File
@@ -1,2 +0,0 @@
[Sun Sep 15 20:09:10.537221 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.62 (Debian) PHP/8.1.29 configured -- resuming normal operations
[Sun Sep 15 20:09:10.537923 2024] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
+2
View File
@@ -32,3 +32,5 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
| items. It can always be used within your own application too.
*/
defined('CI_DEBUG') || define('CI_DEBUG', true);
define ('API_ENDPOINT',"https://apigate.lotus.g1.wrenchboard.com");
+2
View File
@@ -23,3 +23,5 @@ ini_set('display_errors', '0');
| release of the framework.
*/
defined('CI_DEBUG') || define('CI_DEBUG', false);
define ('API_ENDPOINT',"https://apigate.orion.g1.wrenchboard.com");
+2
View File
@@ -36,3 +36,5 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
| release of the framework.
*/
defined('CI_DEBUG') || define('CI_DEBUG', true);
define ('API_ENDPOINT',"https://apigate.lotus.g1.wrenchboard.com");
+1 -1
View File
@@ -104,6 +104,6 @@ abstract class BaseController extends Controller
}
public function wrenchApiServer():string{
return getenv("API_ENDPOINT")."/en/promo/api/v1/";
return API_ENDPOINT."/en/promo/api/v1/";
}
}
+2
View File
@@ -12,6 +12,8 @@ services:
- APACHE_RUN_GROUP=#${UID}
#- CI_ENV
- CI_CONFIG
- CI_ENVIRONMENT=${CI_ENVIRONMENT:-development}
env_file: ${ENV_FILE:-.env.development}
restart: unless-stopped
volumes:
- ./:/var/www/html