-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (108 loc) · 2.78 KB
/
docker-compose.yml
File metadata and controls
113 lines (108 loc) · 2.78 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '3.8'
services:
rusd1:
build:
context: .
dockerfile: Dockerfile
container_name: rusd1
environment:
RUST_LOG: info
command: >
--name rusd1
--data-dir /data
--listen-client-urls http://0.0.0.0:2379
--listen-peer-urls http://0.0.0.0:2380
--advertise-client-urls http://rusd1:2379
--initial-advertise-peer-urls http://rusd1:2380
--initial-cluster "rusd1=http://rusd1:2380,rusd2=http://rusd2:2380,rusd3=http://rusd3:2380"
--initial-cluster-state new
--initial-cluster-token rusd-test-cluster
ports:
- "2379:2379"
- "2380:2380"
volumes:
- rusd1-data:/data
networks:
- rusd-cluster
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2379/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
rusd2:
build:
context: .
dockerfile: Dockerfile
container_name: rusd2
environment:
RUST_LOG: info
command: >
--name rusd2
--data-dir /data
--listen-client-urls http://0.0.0.0:2379
--listen-peer-urls http://0.0.0.0:2380
--advertise-client-urls http://rusd2:2379
--initial-advertise-peer-urls http://rusd2:2380
--initial-cluster "rusd1=http://rusd1:2380,rusd2=http://rusd2:2380,rusd3=http://rusd3:2380"
--initial-cluster-state new
--initial-cluster-token rusd-test-cluster
ports:
- "2381:2379"
- "2381:2380"
volumes:
- rusd2-data:/data
networks:
- rusd-cluster
depends_on:
rusd1:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2379/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
rusd3:
build:
context: .
dockerfile: Dockerfile
container_name: rusd3
environment:
RUST_LOG: info
command: >
--name rusd3
--data-dir /data
--listen-client-urls http://0.0.0.0:2379
--listen-peer-urls http://0.0.0.0:2380
--advertise-client-urls http://rusd3:2379
--initial-advertise-peer-urls http://rusd3:2380
--initial-cluster "rusd1=http://rusd1:2380,rusd2=http://rusd2:2380,rusd3=http://rusd3:2380"
--initial-cluster-state new
--initial-cluster-token rusd-test-cluster
ports:
- "2382:2379"
- "2382:2380"
volumes:
- rusd3-data:/data
networks:
- rusd-cluster
depends_on:
rusd2:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2379/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
volumes:
rusd1-data:
driver: local
rusd2-data:
driver: local
rusd3-data:
driver: local
networks:
rusd-cluster:
driver: bridge