redis connect 수정

This commit is contained in:
2026-03-24 19:11:19 +09:00
parent e2f49ba77e
commit 81b85ae25d

View File

@@ -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");