forked from RoboSats/robosats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-tests.yml
214 lines (201 loc) · 5.97 KB
/
docker-tests.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
# Spin up a regtest lightning network to run integration tests:
# docker-compose -f docker-tests.yml --env-file tests/compose.env up -d
# Some useful handy commands that hopefully are never needed
# docker-compose -f docker-tests.yml --env-file tests/compose.env down --volumes
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test createwallet default
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test -generate 101
# docker exec -it coordinator-LND lncli --network=regtest getinfo
# docker exec -it robot-LND lncli --network=regtest --rpcserver localhost:10010 getinfo
version: '3.9'
services:
bitcoind:
image: ruimarinho/bitcoin-core:${BITCOIND_VERSION:-24.0.1}-alpine
container_name: test-btc
restart: always
ports:
- "8000:8000"
- "8080:8080"
- "8081:8081"
- "10009:10009"
- "10010:10010"
- "9999:9999"
- "9998:9998"
- "5432:5432"
- "6379:6379"
- "7777:7777"
volumes:
- bitcoin:/bitcoin/.bitcoin/
- ./tests/bitcoind/entrypoint.sh:/entrypoint.sh
entrypoint: ["/entrypoint.sh"]
command:
--txindex=1
--printtoconsole
--regtest=1
--server=1
--rest=1
--rpcuser=test
--rpcpassword=test
--logips=1
--debug=1
--rpcport=18443
--rpcallowip=172.0.0.0/8
--rpcallowip=192.168.0.0/16
--zmqpubrawblock=tcp://0.0.0.0:28332
--zmqpubrawtx=tcp://0.0.0.0:28333
--listenonion=0
coordinator-LND:
image: lightninglabs/lnd:${LND_VERSION:-v0.17.0-beta}
container_name: test-coordinator-LND
restart: always
volumes:
- bitcoin:/root/.bitcoin/
- lnd:/home/lnd/.lnd
- lnd:/root/.lnd
command:
--noseedbackup
--nobootstrap
--restlisten=localhost:8081
--debuglevel=debug
--maxpendingchannels=10
--rpclisten=0.0.0.0:10009
--listen=0.0.0.0:9735
--no-rest-tls
--color=#4126a7
--alias=RoboSats
--bitcoin.active
--bitcoin.regtest
--bitcoin.node=bitcoind
--bitcoind.rpchost=127.0.0.1
--bitcoind.rpcuser=test
--bitcoind.rpcpass=test
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
--protocol.wumbo-channels
depends_on:
- bitcoind
network_mode: service:bitcoind
coordinator-CLN:
image: elementsproject/lightningd:${CLN_VERSION:-v24.05}
restart: always
container_name: test-coordinator-CLN
environment:
LIGHTNINGD_NETWORK: 'regtest'
volumes:
- cln:/root/.lightning
- ./docker/cln/plugins/holdinvoice:/root/.lightning/plugins/holdinvoice
- bitcoin:/root/.bitcoin
command: --regtest --bitcoin-rpcuser=test --bitcoin-rpcpassword=test --developer --dev-bitcoind-poll=1 --dev-fast-gossip --log-level=debug --bind-addr=127.0.0.1:9737 --max-concurrent-htlcs=483 --grpc-port=9999 --grpc-hold-port=9998 --important-plugin=/root/.lightning/plugins/holdinvoice --database-upgrade=true
depends_on:
- bitcoind
network_mode: service:bitcoind
robot-LND:
image: lightninglabs/lnd:${LND_VERSION:-v0.17.0-beta}
container_name: test-robot-LND
restart: always
volumes:
- bitcoin:/root/.bitcoin/
- lndrobot:/home/lnd/.lnd
- lndrobot:/root/.lnd
command:
--noseedbackup
--nobootstrap
--restlisten=localhost:8080
--no-rest-tls
--debuglevel=debug
--maxpendingchannels=10
--rpclisten=0.0.0.0:10010
--listen=0.0.0.0:9736
--color=#4126a7
--alias=Robot
--bitcoin.active
--bitcoin.regtest
--bitcoin.node=bitcoind
--bitcoind.rpchost=127.0.0.1
--bitcoind.rpcuser=test
--bitcoind.rpcpass=test
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
--protocol.wumbo-channels
depends_on:
- bitcoind
network_mode: service:bitcoind
redis:
image: redis:${REDIS_VERSION:-7.2.1}-alpine
container_name: test-redis
restart: always
volumes:
- redisdata:/data
network_mode: service:bitcoind
coordinator:
build:
context: .
args:
DEVELOPMENT: True
image: backend-image
container_name: test-coordinator
restart: always
environment:
DEVELOPMENT: True
TESTING: True
USE_TOR: False
MACAROON_PATH: 'data/chain/bitcoin/regtest/admin.macaroon'
CLN_DIR: '/cln/regtest/'
BITCOIND_RPCURL: 'http://127.0.0.1:18443'
BITCOIND_RPCUSER: 'test'
BITCOIND_RPCPASSWORD: 'test'
env_file:
- ${ROBOSATS_ENVS_FILE}
depends_on:
- redis
- postgres
network_mode: service:bitcoind
volumes:
- .:/usr/src/robosats
- lnd:/lnd
- lndrobot:/lndrobot
- cln:/cln
healthcheck:
test: ["CMD", "curl", "localhost:8000"]
interval: 5s
timeout: 5s
retries: 3
postgres:
image: postgres:${POSTGRES_VERSION:-14.2}-alpine
container_name: test-sql
restart: always
environment:
POSTGRES_PASSWORD: 'example'
POSTGRES_USER: 'postgres'
POSTGRES_DB: 'postgres'
network_mode: service:bitcoind
# celery-worker:
# image: backend-image
# pull_policy: never
# container_name: test-celery-worker
# restart: always
# environment:
# DEVELOPMENT: True
# TESTING: True
# USE_TOR: False
# MACAROON_PATH: 'data/chain/bitcoin/regtest/admin.macaroon'
# CLN_DIR: '/cln/regtest/'
# BITCOIND_RPCURL: 'http://127.0.0.1:18443'
# BITCOIND_RPCUSER: 'test'
# BITCOIND_RPCPASSWORD: 'test'
# SKIP_COLLECT_STATIC: "true"
# env_file:
# - ${ROBOSATS_ENVS_FILE}
# volumes:
# - .:/usr/src/robosats
# - lnd:/lnd
# - cln:/cln
# command: celery -A robosats worker --loglevel=INFO --concurrency 2 --max-tasks-per-child=4 --max-memory-per-child=200000
# depends_on:
# - redis
# network_mode: service:bitcoind
volumes:
redisdata:
bitcoin:
lnd:
cln:
lndrobot: