zoukankan      html  css  js  c++  java
  • sentinel集群docker-compose.yml配置


    redis安装

    version: '3.1'
    services:
    master:
    image: redis
    container_name: redis-master
    ports:
    - 6379:6379

    slave1:
    image: redis
    container_name: redis-slave-1
    ports:
    - 6380:6379
    command: redis-server --slaveof redis-master 6379

    slave2:
    image: redis
    container_name: redis-slave-2
    ports:
    - 6381:6379
    command: redis-server --slaveof redis-master 6379

    sentinel安装

    version: '3.1'
    services:
    sentinel1:
    image: redis
    container_name: redis-sentinel-1
    ports:
    - 26379:26379
    command: redis-sentinel /usr/local/etc/redis/sentinel.conf
    volumes:
    - ./sentinel1.conf:/usr/local/etc/redis/sentinel.conf

    sentinel2:
    image: redis
    container_name: redis-sentinel-2
    ports:
    - 26380:26379
    command: redis-sentinel /usr/local/etc/redis/sentinel.conf
    volumes:
    - ./sentinel2.conf:/usr/local/etc/redis/sentinel.conf

    sentinel3:
    image: redis
    container_name: redis-sentinel-3
    ports:
    - 26381:26379
    command: redis-sentinel /usr/local/etc/redis/sentinel.conf
    volumes:
    - ./sentinel3.conf:/usr/local/etc/redis/sentinel.conf

  • 相关阅读:
    【k8s】Volume-persistentVolumeReclaimPolicy
    【k8s】Volume-pv
    【k8s】Secret-生成环境变量
    【k8s】Volume-nfs
    【k8s】Volume-hostPath
    【k8s】Volume-emptyDir
    【k8s】Volume-downwardAPI
    【k8s】Volume-Secret
    【k8s】Volume-ConfigMap-file
    SQL SERVER 列转行
  • 原文地址:https://www.cnblogs.com/leigepython/p/11008114.html
Copyright © 2011-2022 走看看