Skip to content

Instantly share code, notes, and snippets.

@abhisekp
Last active December 24, 2023 09:10
Show Gist options
  • Save abhisekp/af78f71e26d985fb404cc16ec2a0681b to your computer and use it in GitHub Desktop.
Save abhisekp/af78f71e26d985fb404cc16ec2a0681b to your computer and use it in GitHub Desktop.
Redis Docker Setup

Redis Docker Setup

# Redis Network
docker network create redis
# Redis Docker
docker run --name redis \
-d \
--net redis \
-v /data/redis:/data \
redis:alpine redis-server \
--appendonly yes \
--save 60 1 \
--rdbcompression yes \
--appendfsync everysec \
--loglevel warning
# Redis CLI
alias redis-cli='docker exec -it redis redis-cli -h localhost'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment