version: '3.8' services: cache: image: redis:latest restart: always ports: - '6379:6379' command: redis-server --save 20 1 --loglevel warning volumes: - cache:/data volumes: cache: driver: local