forked from cartesi/rollups-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-testnet.yml
172 lines (163 loc) · 4.21 KB
/
docker-compose-testnet.yml
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
version: "3.9"
x-credentials: &postgres-config
POSTGRES_HOSTNAME: database
POSTGRES_PORT: "5432"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
POSTGRES_MIGRATION_FOLDER: /usr/local/bin/migrations/
services:
rollups_dispatcher:
image: cartesi/rollups-dispatcher:0.6.1
command:
[
"--rd-dapp-contract-address-file",
"/deployments/${NETWORK:?undefined NETWORK}/${DAPP_NAME:?undefined DAPP_NAME}.address",
"--mm-endpoint",
"http://server_manager:5001",
"--mm-session-id",
"default_rollups_id",
"--rd-initial-epoch",
"0",
"--sc-grpc-endpoint",
"http://state_server:50051",
"--sc-default-confirmations",
"10",
"--tx-provider-http-endpoint",
"${RPC_URL:?undefined RPC_URL}",
"--tx-mnemonic",
"${MNEMONIC:?undefined MNEMONIC}",
"--tx-chain-id",
"${CHAIN_ID:?undefined CHAIN_ID}",
"--tx-default-confirmations",
"11",
]
restart: always
depends_on:
state_server:
condition: service_healthy
server_manager:
condition: service_healthy
environment:
RUST_LOG: info
volumes:
- blockchain-data:/opt/cartesi/share/blockchain:ro
- ./config:/opt/cartesi/share/config/
- ./deployments:/deployments
state_server:
image: cartesi/rollups-state-server:0.6.1
command:
[
"--sf-genesis-block",
"0x1",
"--sf-safety-margin",
"20",
"--bh-http-endpoint",
"${RPC_URL:?undefined RPC_URL}",
"--bh-ws-endpoint",
"${WSS_URL:?undefined WSS_URL}",
"--bh-block-timeout",
"120",
]
restart: always
healthcheck:
test: ["CMD", "grpc-health-probe", "-addr=:50051"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- blockchain-data:/opt/cartesi/share/blockchain:ro
- ./config:/opt/cartesi/share/config/
environment:
RUST_LOG: info
server_manager:
restart: always
healthcheck:
test: ["CMD", "grpc-health-probe", "-addr=:5001"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- machine:/opt/cartesi/share/dapp-bin
rollups_inspect_server:
image: cartesi/rollups-inspect-server:0.6.1
command:
[
"--inspect-server-address",
"0.0.0.0:5005",
"--server-manager-address",
"server_manager:5001",
"--session-id",
"default_rollups_id",
]
restart: always
ports:
- "5005:5005"
depends_on:
server_manager:
condition: service_healthy
environment:
RUST_LOG: info
rollups_indexer:
image: cartesi/rollups-indexer:0.6.1
command:
[
"--dapp-contract-address-file",
"/deployments/${NETWORK:?undefined NETWORK}/${DAPP_NAME:?undefined DAPP_NAME}.address",
"--session-id",
"default_rollups_id",
"--initial-epoch",
"0",
"--interval",
"10",
"--confirmations",
"10",
"--state-server-endpoint",
"http://state_server:50051",
"--mm-endpoint",
"http://server_manager:5001",
]
restart: always
depends_on:
state_server:
condition: service_healthy
server_manager:
condition: service_healthy
database:
condition: service_healthy
environment:
<<: *postgres-config
RUST_LOG: info
volumes:
- blockchain-data:/opt/cartesi/share/blockchain
- ./config:/opt/cartesi/share/config/
- ./deployments:/deployments
query_server:
image: cartesi/query-server:0.6.1
ports:
- "4000:4000"
depends_on:
database:
condition: service_healthy
environment:
RUST_LOG: info
GRAPHQL_HOST: "0.0.0.0"
GRAPHQL_PORT: "4000"
<<: *postgres-config
database:
image: postgres:13-alpine
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres || exit 1"]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_PASSWORD=password
volumes:
- database-data:/var/lib/postgresql/data
volumes:
blockchain-data: {}
machine: {}
database-data: {}