-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (99 loc) · 2.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (99 loc) · 2.51 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
# SPDX-License-Identifier: MPL-2.0
// Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# Docker Compose for Phronesis multi-node cluster
version: '3.8'
services:
node1:
build: .
image: phronesis:latest
container_name: phronesis-node1
hostname: phronesis-node1
environment:
RELEASE_DISTRIBUTION: name
RELEASE_NODE: node1@phronesis-node1
RELEASE_COOKIE: ${PHRONESIS_CLUSTER_COOKIE:-phronesis_secure_cookie}
PHRONESIS_CONSENSUS_ENABLED: "true"
PHRONESIS_NODE_ID: node1
ERL_DIST_PORT: 9100
ports:
- "4369:4369"
- "9100:9100"
volumes:
- node1_data:/app/priv/consensus_data
networks:
- phronesis_cluster
healthcheck:
test: ["CMD", "/app/bin/phronesis", "rpc", "node()"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
node2:
build: .
image: phronesis:latest
container_name: phronesis-node2
hostname: phronesis-node2
environment:
RELEASE_DISTRIBUTION: name
RELEASE_NODE: node2@phronesis-node2
RELEASE_COOKIE: ${PHRONESIS_CLUSTER_COOKIE:-phronesis_secure_cookie}
PHRONESIS_CONSENSUS_ENABLED: "true"
PHRONESIS_NODE_ID: node2
ERL_DIST_PORT: 9101
ports:
- "4370:4369"
- "9101:9101"
volumes:
- node2_data:/app/priv/consensus_data
networks:
- phronesis_cluster
depends_on:
node1:
condition: service_healthy
healthcheck:
test: ["CMD", "/app/bin/phronesis", "rpc", "node()"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
node3:
build: .
image: phronesis:latest
container_name: phronesis-node3
hostname: phronesis-node3
environment:
RELEASE_DISTRIBUTION: name
RELEASE_NODE: node3@phronesis-node3
RELEASE_COOKIE: ${PHRONESIS_CLUSTER_COOKIE:-phronesis_secure_cookie}
PHRONESIS_CONSENSUS_ENABLED: "true"
PHRONESIS_NODE_ID: node3
ERL_DIST_PORT: 9102
ports:
- "4371:4369"
- "9102:9102"
volumes:
- node3_data:/app/priv/consensus_data
networks:
- phronesis_cluster
depends_on:
node2:
condition: service_healthy
healthcheck:
test: ["CMD", "/app/bin/phronesis", "rpc", "node()"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
node1_data:
driver: local
node2_data:
driver: local
node3_data:
driver: local
networks:
phronesis_cluster:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16