Documentation
Redis Cache & Queues
Configure the in-memory Redis data store utilized by nLink for high-speed caching and background job processing.
Docker Compose Blueprint
Redis acts as the backbone for temporary data flow states and caching mechanisms in the nLink backend (including Persistent Session Memory for the AI Supervisor). The recommended configuration deploys a lightweight Alpine image with password protection enabled.
redis_server:
image: redis:alpine
restart: always
command: redis-server --requirepass 123456
volumes:
- redis_data:/data
volumes:
redis_data:Configuration Details
- Engine Version:
redis:alpine
(The smallest and fastest memory-footprint container image). - Security:
--requirepass 123456
(By default, the compose file overrides the generic Redis boot command to inject a password. In production, change123456to a robust, secure password). - Port Mapping:
6380:6379
(The container runs natively on6379, but is exposed to your host machine on6380to prevent conflicts if you already have a local Redis instance running). - Volume Persistence:
redis_data
(Maps the internal/datadirectory, ensuring job buffers persist across container restarts).
Environment Integration
To allow the backend to connect to this Redis container, ensure the following variables match correctly in your `.env` or Docker Compose file:
nlink:
environment:
- REDIS_ADDR=redis_server:6379
- REDIS_PASSWORD=123456
- REDIS_DB=8