Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. docker-compose.yaml:
- services:
- redis-1:
- build: ./redis-server
- volumes:
- - ./redis-server/conf/dev.conf:/usr/local/etc/redis/redis.conf
- redis-2:
- build: ./redis-server
- volumes:
- - ./redis-server/conf/dev.conf:/usr/local/etc/redis/redis.conf
- redis-3:
- build: ./redis-server
- volumes:
- - ./redis-cluster/redis/conf/dev.conf:/usr/local/etc/redis/redis.conf
- sentinel-1:
- build: ./redis-sentinel
- volumes:
- - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
- ports:
- - "26379:26379"
- sentinel-2:
- build: ./redis-sentinel
- volumes:
- - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
- ports:
- - "26380:26379"
- sentinel-3:
- build: ./redis-sentinel
- volumes:
- - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
- ports:
- - "26381:26379"
- networks:
- default:
- name: redis_cluster
- 2. Tree
- .
- ├── dev-rm.sh
- ├── dev-start.sh
- ├── docker-compose.yaml
- ├── prod-rm.sh
- ├── prod-start.sh
- ├── redis-sentinel
- │ ├── conf
- │ │ └── dev.conf
- │ └── Dockerfile
- └── redis-server
- ├── conf
- │ ├── dev.conf
- │ └── prod.conf
- └── Dockerfile
- 4 directories, 10 files
- 3. Sentinel Dockerfile
- # syntax=docker/dockerfile:latest
- FROM bitnami/redis-sentinel
- EXPOSE 6973/tcp
- ENTRYPOINT redis-sentinel
- 4. Result
- # docker-compose run sentinel-1
- 6:X 09 May 2020 14:12:42.720 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
- 6:X 09 May 2020 14:12:42.720 # Redis version=6.0.1, bits=64, commit=00000000, modified=0, pid=6, just started
- 6:X 09 May 2020 14:12:42.720 # Warning: no config file specified, using the default config. In order to specify a config file use redis-sentinel /path/to/sentinel.conf
- _._
- _.-``__ ''-._
- _.-`` `. `_. ''-._ Redis 6.0.1 (00000000/0) 64 bit
- .-`` .-```. ```\/ _.,_ ''-._
- ( ' , .-` | `, ) Running in sentinel mode
- |`-._`-...-` __...-.``-._|'` _.-'| Port: 26379
- | `-._ `._ / _.-' | PID: 6
- `-._ `-._ `-./ _.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' | http://redis.io
- `-._ `-._`-.__.-'_.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' |
- `-._ `-._`-.__.-'_.-' _.-'
- `-._ `-.__.-' _.-'
- `-._ _.-'
- `-.__.-'
- 6:X 09 May 2020 14:12:42.725 # Sentinel started without a config file. Exiting...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement