redis connect 수정
This commit is contained in:
@@ -102,7 +102,9 @@ try {
|
||||
// 4. Redis 연결
|
||||
$redis = new Redis();
|
||||
// Docker 서비스 이름인 'redis' 사용
|
||||
$success = $redis->connect('redis', 6379);
|
||||
$redisHost = getenv('REDIS_HOST') ?: 'infra-redis'; // ✅ 가능
|
||||
$redisPort = getenv('REDIS_PORT') ?: 6379;
|
||||
$success = $redis->connect($redisHost, $redisPort);
|
||||
|
||||
if (!$success) {
|
||||
throw new Exception("Could not connect to Redis");
|
||||
|
||||
Reference in New Issue
Block a user