3dfaa3d5fa
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
version: "3.8"
|
|
services:
|
|
master:
|
|
image: redis
|
|
container_name: redis-master
|
|
command: redis-server --port 6380
|
|
ports:
|
|
- 6380:6380
|
|
healthcheck:
|
|
test: redis-cli -p 6380 ping
|
|
node1:
|
|
image: redis
|
|
container_name: redis-node-1
|
|
ports:
|
|
- 6381:6381
|
|
command: redis-server --port 6381 --slaveof redis-master 6380
|
|
healthcheck:
|
|
test: redis-cli -p 6381 ping
|
|
node2:
|
|
image: redis
|
|
container_name: redis-node-2
|
|
ports:
|
|
- 6382:6382
|
|
command: redis-server --port 6382 --slaveof redis-master 6380
|
|
healthcheck:
|
|
test: redis-cli -p 6382 ping
|
|
sentinel1:
|
|
image: redis
|
|
container_name: redis-sentinel-1
|
|
ports:
|
|
- 26379:26379
|
|
command: redis-sentinel /usr/local/etc/redis/conf/sentinel1.conf
|
|
healthcheck:
|
|
test: redis-cli -p 26379 ping
|
|
volumes:
|
|
- ./resources/compose/config:/usr/local/etc/redis/conf
|
|
sentinel2:
|
|
image: redis
|
|
container_name: redis-sentinel-2
|
|
ports:
|
|
- 36379:26379
|
|
command: redis-sentinel /usr/local/etc/redis/conf/sentinel2.conf
|
|
healthcheck:
|
|
test: redis-cli -p 36379 ping
|
|
volumes:
|
|
- ./resources/compose/config:/usr/local/etc/redis/conf
|
|
sentinel3:
|
|
image: redis
|
|
container_name: redis-sentinel-3
|
|
ports:
|
|
- 46379:26379
|
|
command: redis-sentinel /usr/local/etc/redis/conf/sentinel3.conf
|
|
healthcheck:
|
|
test: redis-cli -p 46379 ping
|
|
volumes:
|
|
- ./resources/compose/config:/usr/local/etc/redis/conf
|
|
|
|
networks:
|
|
default:
|
|
name: traefik-test-network
|
|
external: true
|