-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdocker-compose.yml
238 lines (228 loc) · 9.34 KB
/
docker-compose.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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---
x-default-logging: &default-logging
driver: local
options:
max-size: "500m"
max-file: "5"
compress: "true"
services:
dashmate_helper:
image: ${DASHMATE_HELPER_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "Dashmate Helper"
restart: unless-stopped
logging: *default-logging
environment:
- LOCAL_UID=${LOCAL_UID:?err}
- LOCAL_GID=${LOCAL_GID:?err}
- DASHMATE_HOME_DIR=${DASHMATE_HOME_DIR:?err}
ports:
- 127.0.0.1:${DASHMATE_HELPER_API_PORT:?err}:${DASHMATE_HELPER_API_PORT:?err}
command: yarn workspace dashmate helper ${CONFIG_NAME:?err}
expose:
- ${DASHMATE_HELPER_API_PORT:?err}
volumes:
- ${DASHMATE_HOME_DIR:?err}:${DASHMATE_HOME_DIR:?err}
- /var/run/docker.sock:/var/run/docker.sock
core:
image: ${CORE_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "Core"
restart: unless-stopped
logging: *default-logging
ports:
- ${CORE_P2P_HOST:?err}:${CORE_P2P_PORT:?err}:${CORE_P2P_PORT:?err}
- ${CORE_RPC_HOST:?err}:${CORE_RPC_PORT:?err}:${CORE_RPC_PORT:?err}
volumes:
- core_data:/home/dash
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/core/dash.conf:/home/dash/.dashcore/dash.conf:ro
command:
- dashd
stop_grace_period: 30s
environment:
# Solving issue under WSL when after restart container volume is not being mounted properly
# https://github.com/docker/for-win/issues/4812
# Following fix forces container recreation
- WSL2_FIX=${WSL2_FIX:-0}
profiles:
- core
drive_abci:
image: ${PLATFORM_DRIVE_ABCI_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "Drive ABCI"
restart: unless-stopped
logging: *default-logging
volumes:
- drive_abci_data:/var/lib/dash/rs-drive-abci/db
environment:
- CHAIN_ID=${PLATFORM_DRIVE_TENDERDASH_GENESIS_CHAIN_ID:-devnet}
- CORE_CONSENSUS_JSON_RPC_USERNAME=drive_consensus
- CORE_CONSENSUS_JSON_RPC_PASSWORD=${CORE_RPC_USERS_DRIVE_CONSENSUS_PASSWORD:?err}
- CORE_CONSENSUS_JSON_RPC_HOST=core
- CORE_CONSENSUS_JSON_RPC_PORT=${CORE_RPC_PORT:?err}
- CORE_CHECK_TX_JSON_RPC_USERNAME=drive_check_tx
- CORE_CHECK_TX_JSON_RPC_PASSWORD=${CORE_RPC_USERS_DRIVE_CHECK_TX_PASSWORD:?err}
- CORE_CHECK_TX_JSON_RPC_HOST=core
- CORE_CHECK_TX_JSON_RPC_PORT=${CORE_RPC_PORT:?err}
- EPOCH_TIME_LENGTH_S=${PLATFORM_DRIVE_ABCI_EPOCH_TIME}
- VALIDATOR_SET_QUORUM_TYPE=${PLATFORM_DRIVE_ABCI_VALIDATOR_SET_QUORUM_LLMQ_TYPE:?err}
- VALIDATOR_SET_QUORUM_WINDOW=${PLATFORM_DRIVE_ABCI_VALIDATOR_SET_QUORUM_DKG_INTERVAL:?err}
- VALIDATOR_SET_QUORUM_ACTIVE_SIGNERS=${PLATFORM_DRIVE_ABCI_VALIDATOR_SET_QUORUM_ACTIVE_SIGNERS:?err}
- VALIDATOR_SET_QUORUM_ROTATION=${PLATFORM_DRIVE_ABCI_VALIDATOR_SET_QUORUM_ROTATION:?err}
- CHAIN_LOCK_QUORUM_TYPE=${PLATFORM_DRIVE_ABCI_CHAIN_LOCK_QUORUM_LLMQ_TYPE:?err}
- CHAIN_LOCK_QUORUM_WINDOW=${PLATFORM_DRIVE_ABCI_CHAIN_LOCK_QUORUM_DKG_INTERVAL:?err}
- CHAIN_LOCK_QUORUM_ACTIVE_SIGNERS=${PLATFORM_DRIVE_ABCI_CHAIN_LOCK_QUORUM_ACTIVE_SIGNERS:?err}
- CHAIN_LOCK_QUORUM_ROTATION=${PLATFORM_DRIVE_ABCI_CHAIN_LOCK_QUORUM_ROTATION:?err}
- INSTANT_LOCK_QUORUM_TYPE=${PLATFORM_DRIVE_ABCI_INSTANT_LOCK_QUORUM_LLMQ_TYPE:?err}
- INSTANT_LOCK_QUORUM_WINDOW=${PLATFORM_DRIVE_ABCI_INSTANT_LOCK_QUORUM_DKG_INTERVAL:?err}
- INSTANT_LOCK_QUORUM_ACTIVE_SIGNERS=${PLATFORM_DRIVE_ABCI_INSTANT_LOCK_QUORUM_ACTIVE_SIGNERS:?err}
- INSTANT_LOCK_QUORUM_ROTATION=${PLATFORM_DRIVE_ABCI_INSTANT_LOCK_QUORUM_ROTATION:?err}
- DB_PATH=/var/lib/dash/rs-drive-abci/db
- ABCI_CONSENSUS_BIND_ADDRESS=tcp://0.0.0.0:26658
- GRPC_BIND_ADDRESS=0.0.0.0:26670
- PROMETHEUS_BIND_ADDRESS=${PLATFORM_DRIVE_ABCI_METRICS_URL}
- TOKIO_CONSOLE_ENABLED=${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_ENABLED:?err}
- TOKIO_CONSOLE_ADDRESS=0.0.0.0:${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_PORT:?err}
- TOKIO_CONSOLE_RETENTION_SECS=${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_RETENTION:?err}
- GROVEDB_VISUALIZER_ENABLED=${PLATFORM_DRIVE_ABCI_GROVEDB_VISUALIZER_ENABLED:?err}
- GROVEDB_VISUALIZER_ADDRESS=0.0.0.0:${PLATFORM_DRIVE_ABCI_GROVEDB_VISUALIZER_PORT:?err}
- PROPOSER_TX_PROCESSING_TIME_LIMIT=${PLATFORM_DRIVE_ABCI_PROPOSER_TX_PROCESSING_TIME_LIMIT}
- NETWORK=${NETWORK:?err}
stop_grace_period: 30s
expose:
- 26658
- 26659
- 26670
env_file:
# Logger settings
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/drive/abci/logger.env
profiles:
- platform
ports:
- ${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_HOST:?err}:${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_PORT:?err}:${PLATFORM_DRIVE_ABCI_TOKIO_CONSOLE_PORT:?err}
- ${PLATFORM_DRIVE_ABCI_METRICS_HOST:?err}:${PLATFORM_DRIVE_ABCI_METRICS_PORT:?err}:29090
- ${PLATFORM_DRIVE_ABCI_GROVEDB_VISUALIZER_HOST:?err}:${PLATFORM_DRIVE_ABCI_GROVEDB_VISUALIZER_PORT:?err}:${PLATFORM_DRIVE_ABCI_GROVEDB_VISUALIZER_PORT:?err}
drive_tenderdash:
image: ${PLATFORM_DRIVE_TENDERDASH_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "Drive Tenderdash"
restart: unless-stopped
logging: *default-logging
depends_on:
- drive_abci
ports:
- ${PLATFORM_DRIVE_TENDERDASH_P2P_HOST:?err}:${PLATFORM_DRIVE_TENDERDASH_P2P_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_P2P_PORT:?err} # P2P
- ${PLATFORM_DRIVE_TENDERDASH_RPC_HOST}:${PLATFORM_DRIVE_TENDERDASH_RPC_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_RPC_PORT:?err} # RPC
- 127.0.0.1:${PLATFORM_DRIVE_TENDERDASH_PPROF_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_PPROF_PORT:?err} # pprof
- ${PLATFORM_DRIVE_TENDERDASH_METRICS_HOST:?err}:${PLATFORM_DRIVE_TENDERDASH_METRICS_PORT:?err}:${PLATFORM_DRIVE_TENDERDASH_METRICS_PORT:?err} # Metrics
volumes:
- drive_tenderdash:/tenderdash
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/drive/tenderdash:/tenderdash/config:ro
stop_grace_period: 10s
profiles:
- platform
dapi_api:
image: ${PLATFORM_DAPI_API_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "DAPI API"
restart: unless-stopped
logging: *default-logging
deploy:
mode: replicated
replicas: ${PLATFORM_DAPI_API_DOCKER_DEPLOY_REPLICAS:-1}
depends_on:
- drive_tenderdash
environment:
- API_JSON_RPC_PORT=3004
- API_GRPC_PORT=3005
- DASHCORE_RPC_HOST=core
- DASHCORE_RPC_PORT=${CORE_RPC_PORT:?err}
- DASHCORE_RPC_USER=dapi
- DASHCORE_RPC_PASS=${CORE_RPC_USERS_DAPI_PASSWORD:?err}
- DASHCORE_ZMQ_HOST=core
- DASHCORE_ZMQ_PORT=29998
- NETWORK=${NETWORK:?err}
- TENDERMINT_RPC_HOST=drive_tenderdash
- TENDERMINT_RPC_PORT=${PLATFORM_DRIVE_TENDERDASH_RPC_PORT:?err}
- NODE_ENV=${ENVIRONMENT:?err}
- DRIVE_RPC_HOST=drive_abci
- DRIVE_RPC_PORT=26670
- WAIT_FOR_ST_RESULT_TIMEOUT=${PLATFORM_DAPI_API_WAIT_FOR_ST_RESULT_TIMEOUT:?err}
command: yarn run api
stop_grace_period: 10s
expose:
- 3004
- 3005
profiles:
- platform
dapi_core_streams:
image: ${PLATFORM_DAPI_API_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "DAPI Transactions Filter Stream"
restart: unless-stopped
logging: *default-logging
deploy:
mode: replicated
replicas: ${PLATFORM_DAPI_API_DOCKER_DEPLOY_REPLICAS:-1}
environment:
- TX_FILTER_STREAM_GRPC_PORT=3006
- DASHCORE_RPC_HOST=core
- DASHCORE_RPC_PORT=${CORE_RPC_PORT:?err}
- DASHCORE_RPC_USER=dapi
- DASHCORE_RPC_PASS=${CORE_RPC_USERS_DAPI_PASSWORD:?err}
- DASHCORE_ZMQ_HOST=core
- DASHCORE_ZMQ_PORT=29998
- NETWORK=${NETWORK:?err}
- TENDERMINT_RPC_HOST=drive_tenderdash
- TENDERMINT_RPC_PORT=26657
- DRIVE_RPC_HOST=drive_abci
- DRIVE_RPC_PORT=26670
expose:
- 3006
command: yarn run core-streams
stop_grace_period: 10s
profiles:
- platform
gateway:
image: ${PLATFORM_GATEWAY_DOCKER_IMAGE:?err}
labels:
org.dashmate.service.title: "Gateway"
restart: unless-stopped
logging: *default-logging
ports:
# HTTP entry point to the platform.
# Supports HTTP1 and HTTP2
# Serves JSON RPC, gRPC, and gRPC-Web
- ${PLATFORM_GATEWAY_LISTENERS_DAPI_AND_DRIVE_HOST:?err}:${PLATFORM_GATEWAY_LISTENERS_DAPI_AND_DRIVE_PORT:?err}:10000
- ${PLATFORM_GATEWAY_METRICS_HOST:?err}:${PLATFORM_GATEWAY_METRICS_PORT:?err}:9090
- ${PLATFORM_GATEWAY_ADMIN_HOST:?err}:${PLATFORM_GATEWAY_ADMIN_PORT:?err}:9901
depends_on:
- dapi_api
- dapi_core_streams
- drive_abci
networks:
- default
- gateway_rate_limiter
environment:
- ENVOY_UID=${LOCAL_UID:?err}
- ENVOY_GID=${LOCAL_GID:?err}
- LOG_LEVEL=${PLATFORM_GATEWAY_LOG_LEVEL:?err}
volumes:
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/gateway/envoy.yaml:/etc/envoy/envoy.yaml:ro
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/gateway/ssl/bundle.crt:/etc/ssl/bundle.crt:ro
- ${DASHMATE_HOME_DIR:?err}/${CONFIG_NAME:?err}/platform/gateway/ssl/private.key:/etc/ssl/private.key:ro
stop_grace_period: 10s
profiles:
- platform
volumes:
core_data:
drive_abci_data:
drive_tenderdash:
networks:
default:
driver: bridge
ipam:
config:
- subnet: ${DOCKER_NETWORK_SUBNET:?err}
gateway_rate_limiter:
driver: bridge