chore: use environment variables for database credentials

This commit is contained in:
2026-06-10 22:41:52 +07:00
parent 55defff6cd
commit 0c6f6c5e6c
2 changed files with 11 additions and 6 deletions
+5 -5
View File
@@ -11,11 +11,11 @@ ini_set('display_startup_errors', '0');
// Mulai output buffering untuk tangkap output tak terduga
ob_start();
define('DB_HOST', 'db');
define('DB_PORT', '3306');
define('DB_NAME', 'geososial');
define('DB_USER', 'root');
define('DB_PASS', 'root');
define('DB_HOST', getenv('DB_HOST') ?: 'db');
define('DB_PORT', getenv('DB_PORT') ?: '3306');
define('DB_NAME', getenv('DB_NAME_GEOSOSIAL') ?: 'geososial');
define('DB_USER', getenv('DB_USER') ?: 'root');
define('DB_PASS', getenv('DB_PASS') ?: 'root');
define('DB_CHARSET', 'utf8mb4');
// CORS Headers