Merge pull request #4666 from TTopoo/redis-username-support

fix(config): support Redis ACL username
This commit is contained in:
Wesley Liddick
2026-07-21 10:43:54 +08:00
committed by GitHub
18 changed files with 77 additions and 0 deletions
+2
View File
@@ -176,6 +176,8 @@ DATABASE_CONN_MAX_IDLE_TIME_MINUTES=5
# -----------------------------------------------------------------------------
# Redis 监听端口(同时用于应用连接和 Redis 服务端,默认 6379)
REDIS_PORT=6379
# Redis ACL username; leave empty for the default user
REDIS_USERNAME=
# Leave empty for no password (default for local development)
REDIS_PASSWORD=
REDIS_DB=0
+3
View File
@@ -920,6 +920,9 @@ redis:
# Redis port
# Redis 端口
port: 6379
# Redis ACL username (leave empty for default user)
# Redis ACL 用户名(使用默认用户时留空)
username: ""
# Redis password (leave empty if no password is set)
# Redis 密码(如果未设置密码则留空)
password: ""
+1
View File
@@ -36,6 +36,7 @@ services:
- DATABASE_SSLMODE=disable
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_USERNAME=${REDIS_USERNAME:-}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- REDIS_DB=${REDIS_DB:-0}
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@sub2api.local}
+1
View File
@@ -74,6 +74,7 @@ services:
# =======================================================================
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_USERNAME=${REDIS_USERNAME:-}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- REDIS_DB=${REDIS_DB:-0}
- REDIS_POOL_SIZE=${REDIS_POOL_SIZE:-1024}
+1
View File
@@ -60,6 +60,7 @@ services:
# =======================================================================
- REDIS_HOST=${REDIS_HOST:?REDIS_HOST is required}
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_USERNAME=${REDIS_USERNAME:-}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- REDIS_DB=${REDIS_DB:-0}
- REDIS_POOL_SIZE=${REDIS_POOL_SIZE:-1024}
+1
View File
@@ -70,6 +70,7 @@ services:
# =======================================================================
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_USERNAME=${REDIS_USERNAME:-}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- REDIS_DB=${REDIS_DB:-0}
- REDIS_POOL_SIZE=${REDIS_POOL_SIZE:-1024}