diff --git a/src/Framework/Core/AppBootstrapper.php b/src/Framework/Core/AppBootstrapper.php index c4e64e61..110e7aa4 100644 --- a/src/Framework/Core/AppBootstrapper.php +++ b/src/Framework/Core/AppBootstrapper.php @@ -50,6 +50,14 @@ final readonly class AppBootstrapper // Initialize environment with encryption support $env = $this->initializeEnvironment(); + + // Workaround: If REDIS_PASSWORD_FILE is not set but expected file exists, set it manually + // This handles cases where Docker Compose doesn't set the variable correctly + $expectedRedisPasswordFile = '/run/secrets/redis_password'; + if (!$env->has('REDIS_PASSWORD_FILE') && file_exists($expectedRedisPasswordFile)) { + // Add REDIS_PASSWORD_FILE to environment if file exists + $env = $env->withVariable('REDIS_PASSWORD_FILE', $expectedRedisPasswordFile); + } error_log("------ ENVIRONMENT VARIABLES ------"); error_log(print_r($env->all(true), true));