From d75a0467919e6d9625ecfc25b0b8aa1728d72083 Mon Sep 17 00:00:00 2001 From: CaIon Date: Sat, 18 Apr 2026 00:56:07 +0800 Subject: [PATCH] chore(docker-compose): set default redis password Enable Redis requirepass in the compose template and embed the matching credential in REDIS_CONN_STRING, aligning with the existing PostgreSQL default password pattern so out-of-the-box deployments are not left with an unauthenticated Redis instance. --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7a887b60..be8c885b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: environment: - SQL_DSN=postgresql://root:123456@postgres:5432/new-api # ⚠️ IMPORTANT: Change the password in production! # - SQL_DSN=root:123456@tcp(mysql:3306)/new-api # Point to the mysql service, uncomment if using MySQL - - REDIS_CONN_STRING=redis://redis + - REDIS_CONN_STRING=redis://:123456@redis:6379 # ⚠️ IMPORTANT: Change the password in production! - TZ=Asia/Shanghai - ERROR_LOG_ENABLED=true # 是否启用错误日志记录 (Whether to enable error log recording) - BATCH_UPDATE_ENABLED=true # 是否启用批量更新 (Whether to enable batch update) @@ -56,6 +56,7 @@ services: image: redis:latest container_name: redis restart: always + command: ["redis-server", "--requirepass", "123456"] # ⚠️ IMPORTANT: Change this password in production! networks: - new-api-network