Created
November 13, 2025 02:31
-
-
Save joeneldeasis/276d4202812d4eef44fdf5fae4c51434 to your computer and use it in GitHub Desktop.
docker-compose-redis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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