-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
96 lines (96 loc) · 2.55 KB
/
docker-compose.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
version: '3'
services:
ironman:
container_name: ironman
hostname: ironman
image: quay.io/coreos/etcd:v3.5.0
environment:
ETCDCTL_API: '3'
volumes:
- ./data/ironman/:/data
command: |
/usr/local/bin/etcd
--name ironman
--advertise-client-urls http://ironman:2379
--listen-client-urls http://0.0.0.0:2379
--initial-advertise-peer-urls http://ironman:2380
--listen-peer-urls http://0.0.0.0:2380
--initial-cluster-token etcd-cluster-1
--initial-cluster ironman=http://ironman:2380,thor=http://thor:2380,cap=http://cap:2380
--data-dir /data
--initial-cluster-state new
expose:
- "2379"
- "2380"
networks:
- etcd-marvel
thor:
container_name: thor
hostname: thor
image: quay.io/coreos/etcd:v3.5.0
environment:
ETCDCTL_API: '3'
volumes:
- ./data/thor/:/data
command: |
/usr/local/bin/etcd
--name thor
--advertise-client-urls http://thor:2379
--listen-client-urls http://0.0.0.0:2379
--initial-advertise-peer-urls http://thor:2380
--listen-peer-urls http://0.0.0.0:2380
--initial-cluster-token etcd-cluster-1
--initial-cluster ironman=http://ironman:2380,thor=http://thor:2380,cap=http://cap:2380
--data-dir /data
--initial-cluster-state new
expose:
- "2379"
- "2380"
networks:
- etcd-marvel
cap:
container_name: cap
hostname: cap
environment:
ETCDCTL_API: '3'
image: quay.io/coreos/etcd:v3.5.0
volumes:
- ./data/cap/:/data
command: |
/usr/local/bin/etcd
--name cap
--advertise-client-urls http://cap:2379
--listen-client-urls http://0.0.0.0:2379
--initial-advertise-peer-urls http://cap:2380
--listen-peer-urls http://0.0.0.0:2380
--initial-cluster-token etcd-cluster-1
--initial-cluster ironman=http://ironman:2380,thor=http://thor:2380,cap=http://cap:2380
--data-dir /data
--initial-cluster-state new
expose:
- "2379"
- "2380"
networks:
- etcd-marvel
client:
container_name: client
hostname: client
image: quay.io/coreos/etcd:v3.5.0
command: /bin/sh
tty: true
stdin_open: true
environment:
ETCDCTL_ENDPOINTS: "http://ironman:2379,http://thor:2379,http://cap:2379"
ETCDCTL_API: '3'
volumes:
- ./data/:/data
networks:
- etcd-marvel
networks:
etcd-marvel:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.30.0.0/16
gateway: 172.30.0.1