Here are some configuration settings for setting up Redis.
This should go in your docker-compose.yaml
:
redis:
image: redis/redis-stack-server:7.2.0-v2
restart: always
volumes:
- redis-data:/data
- ./config/redis-stack.conf:/redis-stack.conf:ro
And this should go in a file relative to the one above, at ./config/redis-stack.conf
:
bind 127.0.0.1
port 6379
protected-mode yes
requirepass "some-admin-password"
timeout 60
loglevel notice
databases 1
maxclients 100
appendonly yes
appendfsync always
Make sure you set requirepass
to some strong password.