-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
183 lines (162 loc) · 5.79 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
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
# TODO: we're connecting to the default drivechain.live `electrs` instance.
# Run one as part of this infra stack?
enforcer:
image: ghcr.io/layertwo-labs/bip300301_enforcer:sha-89a63ac
restart: unless-stopped
# Adjust these lines to adjust the RUST_LOG (or any other!) env var
environment:
RUST_LOG: trace,h2=info,hyper_util=info
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-electrum-host=electrs
- --wallet-skip-periodic-sync
bitnames:
image: ghcr.io/layertwo-labs/bitnames:sha-1a0d52c
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
- --main-addr=0.0.0.0:50051
# 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-cad1d1b
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
- --rpc-addr=127.0.0.0:6009
- --log-level=trace
- --log-level-file=trace
- --log-dir=/logs/thunder
# TODO: how do we enable SSL here?
electrs:
image: mempool/electrs
# TODO: find something that works here with what's installed on the box
# healthcheck:
# test: ["CMD", "curl", "--fail", "http://localhost:3000/blocks/tip/hash"]
environment:
RUST_BACKTRACE: 1
restart: unless-stopped
ports:
- 50001:50001 # Electrum port!
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:
# since thunder and bitnames are running with host networking, this
# needs to as well in order to find them
network_mode: host
restart: unless-stopped
environment:
BITCOIN_RPC_USER: user
BITCOIN_RPC_PASS: password
BITCOIN_RPC_HOST: localhost
BITCOIN_RPC_PORT: 38332
THUNDER_RPC_URL: http://127.0.0.0:6009
PORT: 3333
HOST: 0.0.0.0
# TODO: update this once the PR is merged into master
# https://github.com/LayerTwo-Labs/fast-withdraw-server-node/pull/1
image: ghcr.io/torkelrogstad/fast-withdraw-server:pr-1
# 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
- logs-data:/logs
buf:
# Assign this to a special profile, so that `docker compose up` doesn't execute it.
profiles: [cli]
image: bufbuild/buf
volumes:
mainchain-data:
enforcer-data:
thunder-data:
bitnames-data:
electrs-data:
logs-data: