Skip to content

Instantly share code, notes, and snippets.

@joeneldeasis
Created November 13, 2025 02:31
Show Gist options
  • Select an option

  • Save joeneldeasis/276d4202812d4eef44fdf5fae4c51434 to your computer and use it in GitHub Desktop.

Select an option

Save joeneldeasis/276d4202812d4eef44fdf5fae4c51434 to your computer and use it in GitHub Desktop.
docker-compose-redis.yml
services:
redis:
image: redis:7-alpine
container_name: redis
restart: unless-stopped
command: >
redis-server
--appendonly yes
--save "900 1" --save "300 10" --save "60 10000"
--maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
# Persistent Redis data
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
networks:
- app-local-network
volumes:
redis-data:
driver: local
networks:
app-local-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment