I will get redis and redis commander up and running using docker.
Source files can be found here:
https://github.com/ikknd/docker-study in folder recipe-04
Here I do several things:
redis-server
", "--appendonly
", "yes
"] - I start redis in persistent storage modeREDIS_HOSTS=local:redis:6379
- tells redis commander how to connect to redisHTTP_USER
and HTTP_PASSWORD
- protect redis commander interface with login/passworddepends_on
" - prevents container to start before other container, on which it dependsdocker-compose up -d
If I now try
localhost:8081
- I will see Redis Commander interface.I can login using root/qwerty credentials.
volumes:
- /var/www/docker-study.loc/recipe-04/docker/redis.conf:/usr/local/etc/redis/redis.conf
and change:
command: ["redis-server", "--appendonly", "yes", "/usr/local/etc/redis/redis.conf"]
Stay Tuned!