1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| version: '3.8' services: redis-master: container_name: redis-master image: 'bitnami/redis:latest' environment: - REDIS_REPLICATION_MODE=master - REDIS_PASSWORD=redispassword ports: - "6379:6379" redis-slave: container_name: slave-redis image: 'bitnami/redis:latest' environment: - REDIS_REPLICATION_MODE=slave - REDIS_MASTER_HOST=redis-master - REDIS_MASTER_PASSWORD=redispassword - REDIS_PASSWORD=redispassword ports: - "7000:6379" depends_on: - redis-master redis-sentinel-1: image: 'bitnami/redis-sentinel:latest' container_name: sentinel-1 environment: - REDIS_MASTER_SET=mymaster - REDIS_MASTER_HOST=127.0.0.1 - REDIS_MASTER_PASSWORD=redispassword - REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000 depends_on: - redis-master - redis-slave ports: - "26379:26379" redis-sentinel-2: image: 'bitnami/redis-sentinel:latest' container_name: sentinel-2 environment: - REDIS_MASTER_SET=mymaster - REDIS_MASTER_HOST=127.0.0.1 - REDIS_MASTER_PASSWORD=redispassword - REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000 depends_on: - redis-master - redis-slave ports: - "26380:26379" redis-sentinel-3: image: 'bitnami/redis-sentinel:latest' container_name: sentinel-3 environment: - REDIS_MASTER_SET=mymaster - REDIS_MASTER_HOST=127.0.0.1 - REDIS_MASTER_PASSWORD=redispassword - REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000 depends_on: - redis-master - redis-slave ports: - "26381:26379"
|