跳转到主要内容

redis单节点部署

redis单节点yaml文件

version: "3"
services:
  redis:
    image: redis
    restart: always # 自动重启
    ports:
      - 6379:6379
    command: redis-server --appendonly yes --requirepass <password> #redis的密码
    networks:
      - redis-bridge

networks: 
  redis-bridge:
    external:
      name: redis-bridge

redis服务启动

docker-compose -f docker-compse.yaml up -d