-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
84 lines (80 loc) · 2.44 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
84
version: '3.1'
services:
etcd-1:
image: quay.io/coreos/etcd:v3.3.12
# network_mode: host
networks:
- etcd
# restart: always
# hostname: etcd-1
logging:
driver: "json-file"
options:
max-size: "30m"
# volumes:
# - ./data/etcd-1:/etcd-1.etcd
ports:
- 4001:4001
- 2380:2380
- 2379:2379
command: /usr/local/bin/etcd --advertise-client-urls http://etcd-1:2379,http://etcd-1:4001
--name etcd-1
--listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001
--initial-advertise-peer-urls http://etcd-1:2380
--listen-peer-urls http://0.0.0.0:2380
--initial-cluster-token etcd-cluster
--initial-cluster etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:12380,etcd-3=http://etcd-3:22380
--initial-cluster-state new
etcd-2:
image: quay.io/coreos/etcd:v3.3.12
networks:
- etcd
# network_mode: host
restart: always
# hostname: etcd-2
logging:
driver: "json-file"
options:
max-size: "30m"
# volumes:
# - ./data/etcd-2:/etcd-2.etcd
ports:
- 14001:14001
- 12380:12380
- 12379:12379
command: /usr/local/bin/etcd --advertise-client-urls http://etcd-2:12379,http://etcd-2:14001
--name etcd-2
--listen-client-urls http://0.0.0.0:12379,http://0.0.0.0:14001
--initial-advertise-peer-urls http://etcd-2:12380
--listen-peer-urls http://0.0.0.0:12380
--initial-cluster-token etcd-cluster
--initial-cluster etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:12380,etcd-3=http://etcd-3:22380
--initial-cluster-state new
etcd-3:
image: quay.io/coreos/etcd:v3.3.12
networks:
- etcd
# network_mode: host
restart: always
# hostname: etcd-3
logging:
driver: "json-file"
options:
max-size: "30m"
# volumes:
# - ./data/etcd-3:/etcd-3.etcd
ports:
- 24001:24001
- 22380:22380
- 22379:22379
command: /usr/local/bin/etcd --advertise-client-urls http://etcd-3:22379,http://etcd-3:24001
--name etcd-3
--listen-client-urls http://0.0.0.0:22379,http://0.0.0.0:24001
--initial-advertise-peer-urls http://etcd-3:22380
--listen-peer-urls http://0.0.0.0:22380
--initial-cluster-token etcd-cluster
--initial-cluster etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:12380,etcd-3=http://etcd-3:22380
--initial-cluster-state new
networks:
etcd:
driver: bridge