debug: Add logging for all *_FILE environment variables
- Log all *_FILE variables from getenv() and $_ENV - Help diagnose why REDIS_PASSWORD_FILE is not set - Check if other *_FILE variables are present
This commit is contained in:
@@ -74,6 +74,23 @@ final readonly class AppBootstrapper
|
||||
error_log("\$_SERVER['REDIS_PASSWORD_FILE']: " . $_SERVER['REDIS_PASSWORD_FILE']);
|
||||
}
|
||||
|
||||
// Check all *_FILE variables
|
||||
error_log("------ ALL *_FILE VARIABLES ------");
|
||||
$allEnvVars = getenv();
|
||||
if ($allEnvVars !== false) {
|
||||
foreach ($allEnvVars as $key => $value) {
|
||||
if (str_ends_with($key, '_FILE')) {
|
||||
error_log("$key: $value");
|
||||
}
|
||||
}
|
||||
}
|
||||
error_log("------ \$_ENV *_FILE VARIABLES ------");
|
||||
foreach ($_ENV as $key => $value) {
|
||||
if (is_string($key) && str_ends_with($key, '_FILE')) {
|
||||
error_log("$key: $value");
|
||||
}
|
||||
}
|
||||
|
||||
// Check if file exists at expected location
|
||||
$expectedFile = '/run/secrets/redis_password';
|
||||
error_log("Expected file path: $expectedFile");
|
||||
|
||||
Reference in New Issue
Block a user