Add a docker-compose.yml config file that will spin up two containers on
invocation of docker-compose up, one running the OTA bot and another
running an instance of redis connected to the OTA bot via a local
network link.
From the OTA bot, a connection to the redis instance is possible using
the hostname of the redis container.
Redis config
The redis container uses a custom config that is copied in from
config/redis.conf. A template was added to the config directory for this
file that was modified from the official redis.conf for Redis 6.0 in the
following way:
Changes
Add a docker-compose.yml config file that will spin up two containers on invocation of
docker-compose up
, one running the OTA bot and another running an instance of redis connected to the OTA bot via a local network link.From the OTA bot, a connection to the redis instance is possible using the hostname of the redis container.
Redis config
The redis container uses a custom config that is copied in from
config/redis.conf
. A template was added to the config directory for this file that was modified from the official redis.conf for Redis 6.0 in the following way:https://redis.io/topics/config
Access Redis locally
To access the redis while it is running inside the container, modify your
docker-compose.yml
like so:Test connectivity via
redis-cli
Assuming the above port-forwarding setup, you can run the following command from your local machine to test connectivity to the redis instance: