Docker - Redis Container with JSON Module
Let's deploy a basic Redis-Stack instance with docker.
1) Config File
Create a folder and an empty redis-stack.conf
file in your working directory.
mkdir config/
touch config/redis-stack.conf
I want to change two default options only.
# bind 192.168.1.100 10.0.0.1 # listens on two specific IPv4 addresses
# bind 127.0.0.1 ::1 # listens on loopback IPv4 and IPv6
# bind * -::* # like the default, all available interfaces
bind 192.168.65.15
# By default protected mode is enabled. You should disable it only if
# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured.
protected-mode no
The instance will bind to the container IP Address and protected-mode no
will allow other hosts to connect to the instance.
The configuration file will be mapped as volume to the container.
2) docker-compose.yml File
Below the container configuration file.
Use the command below to start the container.
docker-compose up -d