fenghuo/dockers/cache-redis.yml

28 lines
597 B
YAML
Raw Permalink Normal View History

2025-05-26 21:45:30 +08:00
services:
redis:
2025-06-05 15:44:06 +08:00
image: redis:latest
2025-05-26 21:45:30 +08:00
container_name: redis
restart: always
ports:
- "6379:6379"
networks:
- nice-net
volumes:
- type: volume
source: cache_data
target: /data
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-nice_redis_password}
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 3s
retries: 3
volumes:
cache_data:
driver: local
driver_opts:
type: none
2025-06-05 15:44:06 +08:00
device: /opt/projects/nice/volumes/redis
2025-05-26 21:45:30 +08:00
o: bind