forked from LayerTwo-Labs/signet-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
358 lines (326 loc) · 11.9 KB
/
docker-compose.yml
File metadata and controls
358 lines (326 loc) · 11.9 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
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
name: signet-server
services:
mainchain:
healthcheck:
test: ["CMD", "drivechain-cli", "-rpcuser=user", "-rpcpassword=password", "-signet", "getblockchaininfo"]
image: ghcr.io/layertwo-labs/bitcoin-patched:sha-32e384a
# map the named volume to the data directory
volumes: [mainchain-data:/home/drivechain/.drivechain]
restart: unless-stopped
ports:
- "38333:38333" # P2P, exposed to the internet
- "127.0.0.1:38332:38332" # RPC, only available from host machine
command:
- drivechaind
- -rpcuser=user
- -rpcpassword=password
- -server
- -signet
- -signetblocktime=60
- -signetchallenge=00141551188e5153533b4fdd555449e640d9cc129456
- -acceptnonstdtxn
- -listen
- -rpcbind=0.0.0.0
- -rpcallowip=0.0.0.0/0
- -txindex
- -fallbackfee=0.00021
- -zmqpubsequence=tcp://0.0.0.0:29000
- -rest
enforcer:
image: ghcr.io/layertwo-labs/bip300301_enforcer:sha-7d37230
pull_policy: always
restart: unless-stopped
environment:
RUST_LOG: debug,h2=info,hyper_util=info
RUST_BACKTRACE: 1
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "grpc_health_probe", "-service=cusf.mainchain.v1.ValidatorService", "-addr=localhost:50051"]
volumes: [enforcer-data:/root/.local/share/bip300301_enforcer]
ports:
- "127.0.0.1:50051:50051" # gRPC, only available from host machine
- "127.0.0.1:8122:8122" # JSON-RPC, only available from host machine
command:
- --log-format=json
- --log-level=trace
- --node-rpc-addr=mainchain:38332
- --node-rpc-user=user
- --node-rpc-pass=password
- --serve-grpc-addr=0.0.0.0:50051 # Expose over 0.0.0.0 so that other services can connect to it
- --serve-rpc-addr=0.0.0.0:8122 # Expose over 0.0.0.0 so that other services can connect to it
- --node-zmq-addr-sequence=tcp://mainchain:29000
- --enable-wallet
- --enable-mempool
- --wallet-auto-create
- --wallet-skip-periodic-sync
# mainchain Bitcoin Core address
- --signet-miner-coinbase-recipient=tb1qduth40j5r3v3rjxfd0qefpnldqzpt00anf8ajl
bitassets:
image: ghcr.io/layertwo-labs/bitassets:sha-989ba91
restart: unless-stopped
healthcheck:
test: ["CMD", "plain_bitassets_app_cli", "balance"]
# Bitassets uses the same networking stack as thunder, so doing the
# same thing here.
network_mode: host
volumes:
- bitassets-data:/root/.local/share/plain_bitassets
- logs-data:/logs
command:
- --headless
- --log-level=trace
- --mainchain-grpc-host=0.0.0.0
# For BitAssets to be reachable from other containers (via host-gateway) ,
# we need to bind to 0.0.0.0. This means that the host machine needs to
# make sure to /not/ expose this to the open internet!
- --rpc-host=0.0.0.0
- --rpc-port=6004
bitnames:
image: ghcr.io/layertwo-labs/bitnames:sha-3b26b94
restart: unless-stopped
healthcheck:
test: ["CMD", "plain_bitnames_app_cli", "balance"]
# Bitnames uses the same networking stack as thunder, so doing the
# same thing here.
network_mode: host
volumes:
- bitnames-data:/root/.local/share/plain_bitnames
- logs-data:/logs
command:
- --headless
- --log-level=trace
- --mainchain-grpc-host=0.0.0.0
- --mainchain-grpc-port=50051
# For Thunder to be reachable from other containers (via host-gateway) ,
# we need to bind to 0.0.0.0. This means that the host machine needs to
# make sure to /not/ expose this to the open internet!
- --rpc-addr=0.0.0.0:6002
# TODO: must make the seed work... Either:
# --mnemonic-seed-phrase-path and a file path
# or a RPC
thunder:
# Cannot get UDP to play well with Docker. Unable to connect external
# nodes to this one through the open internet. Works when running with
# host mode!
network_mode: host
healthcheck:
test: ["CMD", "thunder_app_cli", "--rpc-url=http://127.0.0.0:6009", "balance"]
image: ghcr.io/layertwo-labs/thunder:sha-70af495
restart: unless-stopped
volumes:
- thunder-data:/root/.local/share/thunder
- logs-data:/logs
# As long as we're running the container using the `host` network mode,
# these are discarded.
# ports:
# - "4009:4009/udp" # P2P, exposed to the internet, over UDP
# - "127.0.0.1:6009:6009" # RPC, only available from host machine
entrypoint:
- thunder_app
- --headless
- --mainchain-grpc-url=http://localhost:50051
# For Thunder to be reachable from other containers (via host-gateway) ,
# we need to bind to 0.0.0.0. This means that the host machine needs to
# make sure to /not/ expose this to the open internet!
- --rpc-addr=0.0.0.0:6009
- --log-level=trace
- --log-level-file=trace
- --log-dir=/logs/thunder
zside:
image: ghcr.io/iwakura-rein/thunder-orchard:sha-a8776cd
restart: unless-stopped
# Cannot get UDP to play well with Docker. Unable to connect external
# nodes to this one through the open internet. Works when running with
# host mode!
network_mode: host
healthcheck:
test: ["CMD", "thunder_orchard_app_cli", "--rpc-url=http://127.0.0.0:6098", "balance"]
# TODO: adjust this once we can move away from network_mode: host
# ports: [4098:4098/udp] # P2P
volumes:
- zside-data:/root/.local/share/thunder-orchard
- logs-data:/logs
command:
- --headless
- --mainchain-grpc-url=http://localhost:50051
- --rpc-addr=0.0.0.0:6098
- --log-level=trace
- --log-level-file=trace
- --log-dir=/logs/zside
mempool-db:
environment:
MYSQL_DATABASE: "mempool"
MYSQL_USER: "mempool"
MYSQL_PASSWORD: "mempool"
MYSQL_ROOT_PASSWORD: "admin"
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-u",
"mempool",
"-pmempool",
]
image: mariadb:10.5.21
restart: unless-stopped
stop_grace_period: 1m
volumes: [mysql-data:/var/lib/mysql]
mempool-web:
environment:
FRONTEND_HTTP_PORT: 8080
BACKEND_MAINNET_HTTP_HOST: mempool-api
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080"]
image: mempool/frontend:v3.2.1
restart: unless-stopped
stop_grace_period: 1m
command: "./wait-for mempool-db:3306 --timeout=720 -- nginx -g 'daemon off;'"
ports:
- 8080:8080 # should be reachable externally
mempool-api:
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on: [mempool-db]
# conf: https://github.com/mempool/mempool/blob/e3c3f31ddbf9543db12ef4f7e5032566757d31f9/backend/mempool-config.sample.json#
environment:
MEMPOOL_NETWORK: signet
MEMPOOL_BACKEND: "electrum"
ELECTRUM_HOST: electrs
ELECTRUM_PORT: 50001
ELECTRUM_TLS_ENABLED: "false"
CORE_RPC_HOST: mainchain
CORE_RPC_PORT: 38332
CORE_RPC_USERNAME: user
CORE_RPC_PASSWORD: password
DATABASE_ENABLED: "true"
DATABASE_HOST: "mempool-db"
DATABASE_DATABASE: "mempool"
DATABASE_USERNAME: "mempool"
DATABASE_PASSWORD: "mempool"
STATISTICS_ENABLED: "true"
FIAT_PRICE_ENABLED: false
# 'latest' is on an ancient version
image: mempool/backend:v3.2.1
restart: unless-stopped
stop_grace_period: 1m
healthcheck:
test: ["CMD", "curl", "--fail", "localhost:8999/api/v1/backend-info"]
command: "./wait-for-it.sh mempool-db:3306 --timeout=720 --strict -- ./start.sh"
volumes: [mempool-api-data:/backend/cache]
# TODO: how do we enable SSL here?
electrs:
image: mempool/electrs
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:3000/blocks/tip/height"]
environment:
RUST_BACKTRACE: 1
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
ports:
- 50001:50001 # Electrum port!
- 3000:3000 # Esplora REST API
volumes: [electrs-data:/app/db]
# https://github.com/Blockstream/esplora?tab=readme-ov-file#how-to-run-the-explorer-for-bitcoin-mainnet
command:
- -vvv # pretty verbose logging
- --timestamp
- --cookie=user:password
- --daemon-rpc-addr=mainchain:38332
- --jsonrpc-import
- --db-dir=/app/db
- --network=signet
- --http-addr=0.0.0.0:3000
- --electrum-rpc-addr=0.0.0.0:50001
- --electrum-txs-limit=30000
- --cors=*
fast-withdraw-server:
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
environment:
BITCOIN_RPC_USER: user
BITCOIN_RPC_PASS: password
BITCOIN_RPC_URL: http://mainchain:38332
THUNDER_RPC_URL: http://host.docker.internal:6009
BITNAMES_RPC_URL: http://host.docker.internal:6002
PORT: 3333
HOST: 0.0.0.0
ports:
- 127.0.0.1:3333:3333
image: ghcr.io/layertwo-labs/fast-withdraw-server:sha-b1379c4
faucet-backend:
restart: unless-stopped
# Find image-tags here: https://github.com/LayerTwo-Labs/faucet-backend/pkgs/container/faucet-backend
image: ghcr.io/layertwo-labs/faucet-backend:sha-d947517
pull_policy: always
healthcheck:
test: ["CMD", "curl", "--fail", "-H", "Content-Type: application/json", "-X", "POST", "localhost:8082/faucet.v1.FaucetService/ListClaims"]
ports:
- 8082:8082
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- faucetd
- --bitcoincore.address=mainchain:38332
- --bitcoincore.rpcuser=user
- --bitcoincore.rpcpassword=password
- --enforcer.url=http://enforcer:50051
- --bitnames.url=http://host.docker.internal:6002
- --bitassets.url=http://host.docker.internal:6004
- --thunder.url=http://host.docker.internal:6009
- --zside.url=http://host.docker.internal:6098
- --listen=0.0.0.0:8082
faucet-frontend:
ports:
- 3003:3003
environment:
API_BASE_URL: https://node.drivechain.info/api
METADATA_BASE_URL: https://node.drivechain.info
pull_policy: always
# We want to avoid specifying tags for both signet and forknet by themselves, so we
# try to be a bit clever here. Perhaps too clever? Anyways: COMPOSE_PROJECT_NAME can
# interpolated into the image name, and this is automatically set when running. This
# means that we don't have to provide a .env file, or specify an env var on the
# command line.
# Find image-tags here:
# Signet: https://github.com/LayerTwo-Labs/faucet-frontend-signet-server/pkgs/container/faucet-frontend
# Forknet: https://github.com/LayerTwo-Labs/faucet-frontend-forknet-server/pkgs/container/faucet-frontend
image: ghcr.io/layertwo-labs/faucet-frontend-${COMPOSE_PROJECT_NAME}:sha-d947517
# Can be used to run a container with the same volumes as the other services.
# $ docker compose run --rm busybox sh
# Todays Thunder logs:
# $ docker compose run --rm busybox cat /logs/thunder/$(date +%Y-%m-%d).log | lnav
busybox:
profiles: [cli]
image: busybox
volumes:
- mainchain-data:/mainchain-data
- enforcer-data:/enforcer-data
- thunder-data:/thunder-data
- zside-data:/zside-data
- logs-data:/logs
buf:
# Assign this to a special profile, so that `docker compose up` doesn't execute it.
#
# Usage:
# $ docker compose run --rm buf curl --emit-defaults --protocol grpc --http2-prior-knowledge --list-methods http://enforcer:50051
# $ docker compose run --rm buf curl --emit-defaults --protocol grpc --http2-prior-knowledge http://enforcer:50051/cusf.mainchain.v1.ValidatorService/GetChainTip
profiles: [cli]
image: bufbuild/buf
volumes:
mainchain-data:
enforcer-data:
thunder-data:
zside-data:
bitassets-data:
bitnames-data:
electrs-data:
logs-data:
mysql-data:
mempool-api-data: