docker-compose install Redis

docker-compose install Redis

Edit yml script

version: "3"
services:
  redis:
    image: redis:4
    restart: always
    command: redis-server /usr/local/etc/redis/redis.conf
    ports:
      - 6379:6379
    volumes:
      - ./data:/data
      - ./conf:/usr/local/etc/redis

Add a new conf folder and a new redis.conf file under the same level directory

requirepass ZHOX27BYD
protected-mode no

 

Guess you like

Origin blog.csdn.net/doinbb/article/details/106000859