services: redis: image: redis:${REDIS_VERSION:-7.2.4} 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 device: ${PWD}/volumes/redis o: bind