This commit is contained in:
2026-01-23 23:27:18 +01:00
parent a9445b305f
commit 0a784ef454
12 changed files with 4 additions and 16 deletions

View File

@@ -1,10 +1,9 @@
<?php
$env = getenv('APP_ENV') ?: 'staging';
$env = strtolower($env);
$env = strtolower(getenv('APP_ENV') ?: 'staging');
$env = $env === 'production' ? 'prod' : $env;
if ($env === 'production') {
$path = __DIR__ . '/production/db.php';
} else {
$path = __DIR__ . '/' . $env . '/db.php';
if (!is_file($path)) {
$path = __DIR__ . '/staging/db.php';
}