-
Notifications
You must be signed in to change notification settings - Fork 77
/
docker-compose.yml
83 lines (76 loc) · 1.92 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: "3.1"
services:
zoo1:
image: zookeeper:3.5.9
hostname: zoo1
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
restart: always
zoo2:
image: zookeeper:3.5.9
hostname: zoo2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
restart: always
zoo3:
image: zookeeper:3.5.9
hostname: zoo3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
restart: always
register:
depends_on:
- zoo1
- zoo2
- zoo3
image: jam2in/zkcli:3.5.9
environment:
ZK_ENSEMBLE: zoo1:2181,zoo2:2181,zoo3:2181
SERVICE_CODE: test
CACHENODES: cache1:11211,cache2:11212,cache3:11213
restart: on-failure
cache1:
depends_on:
register:
condition: service_completed_successfully
image: jam2in/arcus-memcached
command: -m 100 -p 11211 -z zoo1:2181,zoo2:2181,zoo3:2181
hostname: cache1
ports:
- 11211:11211
environment:
ARCUS_CACHE_PUBLIC_IP: 127.0.0.1
restart: always
cache2:
depends_on:
register:
condition: service_completed_successfully
image: jam2in/arcus-memcached
command: -m 100 -p 11212 -z zoo1:2181,zoo2:2181,zoo3:2181
hostname: cache2
ports:
- 11212:11212
environment:
ARCUS_CACHE_PUBLIC_IP: 127.0.0.1
restart: always
cache3:
depends_on:
register:
condition: service_completed_successfully
image: jam2in/arcus-memcached
command: -m 100 -p 11213 -z zoo1:2181,zoo2:2181,zoo3:2181
hostname: cache3
ports:
- 11213:11213
environment:
ARCUS_CACHE_PUBLIC_IP: 127.0.0.1
restart: always