version: '3'

services:

  redis1:
    image: redis:6.2.13
    container_name: redis1
    networks:
      yewu-network:
        ipv4_address: 192.168.177.71
    command: redis-server --port 6379 --requirepass FjcpIvWHVSfrZlry --appendonly yes --appendfilename "appendonly.aof" --save ""
    restart: always
    ports:
      - 6379:6379
    volumes:
      - ./redis1-data:/data

networks:
  yewu-network:
    driver: bridge
    ipam:
      config:
        - subnet: 192.168.177.0/24
    name: yewu-network
最后修改:2023 年 11 月 03 日
如果觉得我的文章对你有用,请随意赞赏