feat(redis): Update Redis configuration and enhance compatibility with Docker

- Changed Redis port mapping in `docker-compose.yml` from `6379:6379` to `6380:6379` to avoid conflicts with Windows Redis.
- Updated `.env.example` to reflect the new Redis URL (`redis://127.0.0.1:6380/0`), ensuring proper configuration for Docker users.
- Enhanced Redis client initialization in `database.py` and `redis_gateway.py` to utilize a new `_redis_kwargs` function for improved compatibility with Windows Redis 3.x and Docker Redis 7.
- Added a new PowerShell script `start-redis.ps1` to facilitate starting Redis in Docker, providing a seamless setup experience for developers.

This update significantly improves the Redis integration, ensuring a smoother development process and better compatibility across environments.
This commit is contained in:
2026-09-09 20:19:55 +08:00
parent 95969678e2
commit bf8f271840
10 changed files with 99 additions and 33 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ services:
image: redis:7-alpine
container_name: jinrong-redis
ports:
- "6379:6379"
- "6380:6379"
volumes:
- jinrong_redis_data:/data
restart: unless-stopped