Simple redis deployment documentation using docker

Installation

  1. Install docker.
  2. Pull redis image and run the container
docker run -d \
  --restart=always \
  --name redis-container \
  -p 6379:6379 \
  -v /path-for/rdb:/data \
  redis:latest redis-server --requirepass secretpassword

Gracefully shutting down

docker update --restart=no redis-container
docker exec redis-container redis-cli SHUTDOWN SAVE
docker update --restart=always redis-container