-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-testnet.yaml
198 lines (184 loc) · 4.99 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: kwil-ls-oracle-tesnet
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
# args:
# - DEBUG_PORT=2345
ports:
- "8080:8080"
- "2345:2345"
depends_on:
kwil-postgres-1:
condition: service_healthy
volumes:
- ./examples/testnet/node1/config.toml:/root/.kwild/config.toml
- ./examples/testnet/node1/private_key:/root/.kwild/private_key
- ./examples/testnet/common-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:
- ./examples/testnet/node2/config.toml:/root/.kwild/config.toml
- ./examples/testnet/node2/private_key:/root/.kwild/private_key
- ./examples/testnet/common-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:
- ./examples/testnet/node3/config.toml:/root/.kwild/config.toml
- ./examples/testnet/node3/private_key:/root/.kwild/private_key
- ./examples/testnet/common-genesis.json:/root/.kwild/genesis.json
- type: volume
source: data-kwil-3
target: /root/.kwild
volume:
nocopy: true
networks:
- kwil-network
logstore-node-1:
container_name: logstore-node-1
hostname: logstore-node-1
image: ghcr.io/usherlabs/logstore-node:latest
command: [ "start-in-docker", "start" ]
networks:
- kwil-network
volumes:
- type: bind
source: ./examples/testnet/node1/logstore-config.json
target: /home/node/.logstore/config/default.json
read_only: true
- type: bind
source: ./examples/testnet/node1/
target: /home/node/.logstore/data/
logstore-node-2:
container_name: logstore-node-2
hostname: logstore-node-2
image: ghcr.io/usherlabs/logstore-node:latest
command: [ "start-in-docker", "start" ]
networks:
- kwil-network
volumes:
- type: bind
source: ./examples/testnet/node2/logstore-config.json
target: /home/node/.logstore/config/default.json
read_only: true
- type: bind
source: ./examples/testnet/node3/
target: /home/node/.logstore/data/
logstore-node-3:
container_name: logstore-node-3
hostname: logstore-node-3
image: ghcr.io/usherlabs/logstore-node:latest
command: [ "start-in-docker", "start" ]
networks:
- kwil-network
volumes:
- type: bind
source: ./examples/testnet/node3/logstore-config.json
target: /home/node/.logstore/config/default.json
read_only: true
- type: bind
source: ./examples/testnet/node2/
target: /home/node/.logstore/data/
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: