forked from cpapidas/docker-compose-redis-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 1.16 KB
/
docker-compose.yml
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
version: '3'
services:
redis1:
image: redis:3
ports:
- "7000:7000"
volumes:
- ./docker-data/redis-cluster1.tmpl:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
app_net:
ipv4_address: 173.17.0.2
redis2:
image: redis:3
ports:
- "7001:7001"
volumes:
- ./docker-data/redis-cluster2.tmpl:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
app_net:
ipv4_address: 173.17.0.3
redis3:
image: redis:3
ports:
- "7002:7002"
volumes:
- ./docker-data/redis-cluster3.tmpl:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
app_net:
ipv4_address: 173.17.0.4
redis-cluster:
tty: true
build:
context: .
args:
redis_version: '3.2.9'
hostname: server
depends_on:
- redis1
- redis2
- redis3
networks:
app_net:
ipv4_address: 173.17.0.5
networks:
app_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 173.17.0.0/16