version: '3.3' services: redis: image: redis:latest restart: always ports: - "6379:6379" volumes: - ./local_redis_file/data:/root/redis - ./local_redis_file/redis.conf:/usr/local/etc/redis/redis.conf command: ["redis-server", --protected-mode yes, --port 6379,"--requirepass", P@ssw0rd!]