forked from kwilteam/kwil-streamr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-testnet.yaml
178 lines (168 loc) · 4.49 KB
/
docker-compose-testnet.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
services:
kwil-postgres-1:
image: "kwildb/postgres:latest"
ports:
- "5432:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
# persis data
volumes:
- type: volume
source: data-kwil-postgres-1
target: /var/lib/postgresql/data
volume:
nocopy: true
networks:
- kwil-network
kwil-postgres-2:
image: "kwildb/postgres:latest"
ports:
- "5433:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
# persis data
volumes:
- type: volume
source: data-kwil-postgres-2
target: /var/lib/postgresql/data
volume:
nocopy: true
networks:
- kwil-network
kwil-postgres-3:
image: "kwildb/postgres:latest"
ports:
- "5434:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
# persis data
volumes:
- type: volume
source: data-kwil-postgres-3
target: /var/lib/postgresql/data
volume:
nocopy: true
networks:
- kwil-network
kwil-node-1:
container_name: kwil-node-1
hostname: kwil-node-1
build:
context: .
dockerfile: ./kwil.dockerfile
# Comment out the following lines to enable debugging with delve
# args:
# - DEBUG_PORT=2345
ports:
- "8484:8484"
- "2345:2345"
depends_on:
kwil-postgres-1:
condition: service_healthy
volumes:
- ./config/testnet/config-node-1.toml:/root/.kwild/config.toml
- ./config/testnet/private_key_node_1:/root/.kwild/private_key
- ./config/testnet/genesis.json:/root/.kwild/genesis.json
- type: volume
source: data-kwil-1
target: /root/.kwild
volume:
nocopy: true
networks:
- kwil-network
kwil-node-2:
container_name: kwil-node-2
hostname: kwil-node-2
build:
context: .
dockerfile: ./kwil.dockerfile
# Don't enable ports to enforce the use of node 1 as interface
depends_on:
kwil-postgres-2:
condition: service_healthy
volumes:
- ./config/testnet/config-node-2.toml:/root/.kwild/config.toml
- ./config/testnet/private_key_node_2:/root/.kwild/private_key
- ./config/testnet/genesis.json:/root/.kwild/genesis.json
- type: volume
source: data-kwil-2
target: /root/.kwild
volume:
nocopy: true
networks:
- kwil-network
kwil-node-3:
container_name: kwil-node-3
hostname: kwil-node-3
build:
context: .
dockerfile: ./kwil.dockerfile
# Don't enable ports to enforce the use of node 1 as interface
depends_on:
kwil-postgres-3:
condition: service_healthy
volumes:
- ./config/testnet/config-node-3.toml:/root/.kwild/config.toml
- ./config/testnet/private_key_node_3:/root/.kwild/private_key
- ./config/testnet/genesis.json:/root/.kwild/genesis.json
- type: volume
source: data-kwil-3
target: /root/.kwild
volume:
nocopy: true
networks:
- kwil-network
streamr-node-1:
container_name: streamr-node-1
hostname: streamr-node-1
image: streamr/node
networks:
- kwil-network
ports:
- "7170:7170"
volumes:
- ./config:/home/streamr/.streamr/config
command: ["/usr/local/bin/npm", "exec", "-c", "streamr-broker /home/streamr/.streamr/config/streamr.json"]
streamr-node-2:
container_name: streamr-node-2
hostname: streamr-node-2
image: streamr/node
networks:
- kwil-network
volumes:
- ./config:/home/streamr/.streamr/config
command: ["/usr/local/bin/npm", "exec", "-c", "streamr-broker /home/streamr/.streamr/config/streamr.json"]
streamr-node-3:
container_name: streamr-node-3
hostname: streamr-node-3
image: streamr/node
networks:
- kwil-network
volumes:
- ./config:/home/streamr/.streamr/config
command: ["/usr/local/bin/npm", "exec", "-c", "streamr-broker /home/streamr/.streamr/config/streamr.json"]
networks:
kwil-network:
driver: bridge
volumes:
data-kwil-1:
data-kwil-2:
data-kwil-3:
data-kwil-postgres-1:
data-kwil-postgres-2:
data-kwil-postgres-3: