Skip to content

Instantly share code, notes, and snippets.

@crazyoptimist
Last active May 6, 2024 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crazyoptimist/e5717e66161630d0b87f0e4588e24163 to your computer and use it in GitHub Desktop.
Save crazyoptimist/e5717e66161630d0b87f0e4588e24163 to your computer and use it in GitHub Desktop.
Redis with Docker Compose
name: redis
services:
redis:
image: redis:7
container_name: redis
command: "redis-server --loglevel warning"
volumes:
- redis_data:/data/
ports:
- "6379:6379"
<<: &default_logging
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: always
redis-commander:
container_name: redis-commander
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=1 # 1-15 possible names
ports:
- "8081:8081"
<<: *default_logging
restart: "no"
volumes:
redis_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment