-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.integration.yml
More file actions
209 lines (203 loc) · 6.54 KB
/
docker-compose.integration.yml
File metadata and controls
209 lines (203 loc) · 6.54 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
name: btcpay-floresta-plugin-integration
services:
floresta:
build:
context: ${FLORESTA_REPO:-../Floresta}
dockerfile: Dockerfile
command:
- florestad
- --network
- regtest
- --data-dir
- /data
- --rpc-address
- 0.0.0.0:18442
- --electrum-address
- 0.0.0.0:20001
- --filters-start-height
- "0"
- --no-backfill
expose:
- "18442"
- "20001"
tmpfs:
- /data
healthcheck:
test: ["CMD", "floresta-cli", "--network", "regtest", "--rpc-host", "http://127.0.0.1:18442", "ping"]
interval: 2s
timeout: 2s
retries: 60
start_period: 5s
tests:
image: mcr.microsoft.com/dotnet/sdk:10.0
user: "${DOTNET_TEST_UID:-1000}:${DOTNET_TEST_GID:-1000}"
depends_on:
floresta:
condition: service_healthy
working_dir: /workspace/btcpayserver-floresta-plugin
environment:
FLORESTA_NETWORK: regtest
FLORESTA_REPLACE_BTCPAY_BACKEND: "true"
FLORESTA_RPC_URL: http://floresta:18442
FLORESTA_ELECTRUM_HOST: floresta
FLORESTA_ELECTRUM_PORT: "20001"
FLORESTA_ELECTRUM_TLS: "false"
FLORESTA_READY_TIMEOUT_SECONDS: "120"
FLORESTA_FALLBACK_FEE_SAT_PER_VB: "1"
DOTNET_CLI_HOME: /tmp/dotnet-cli
NUGET_PACKAGES: /workspace/btcpayserver-floresta-plugin/.nuget/packages
volumes:
- .:/workspace/btcpayserver-floresta-plugin
- ${BTCPAYSERVER_REPO:-./submodules/btcpayserver}:/workspace/btcpayserver
command:
- bash
- -lc
- >
dotnet test BTCPayServer.Plugins.Floresta.Tests/BTCPayServer.Plugins.Floresta.Tests.csproj
--filter "Integration=Integration"
--logger "console;verbosity=normal"
-m:1
-p:UseSharedCompilation=false
-p:RunAnalyzers=false
-p:EnableNETAnalyzers=false
-nr:false
postgres:
image: postgres:16
profiles: ["e2e"]
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: btcpayserver
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d btcpayserver"]
interval: 2s
timeout: 2s
retries: 60
start_period: 5s
bitcoind:
image: btcpayserver/bitcoin:31.0
profiles: ["e2e"]
environment:
BITCOIN_NETWORK: regtest
BITCOIN_WALLETDIR: "/data/wallets"
BITCOIN_EXTRA_ARGS: |-
rpcuser=ceiwHEbqWI83
rpcpassword=DwubwWsoo3
rpcport=43782
rpcbind=0.0.0.0:43782
rpcallowip=0.0.0.0/0
port=39388
whitelist=0.0.0.0/0
fallbackfee=0.0002
minrelaytxfee=0.00001000
unsafesqlitesync=1
expose:
- "43782"
- "39388"
tmpfs:
- /data
healthcheck:
test: ["CMD-SHELL", "bitcoin-cli -datadir=/data getblockchaininfo >/dev/null"]
interval: 2s
timeout: 2s
retries: 60
start_period: 5s
utreexod:
build:
context: .
dockerfile: docker/utreexod/Dockerfile
args:
UTREEXOD_REPO: ${UTREEXOD_REPO:-https://github.com/utreexo/utreexod.git}
UTREEXOD_REF: ${UTREEXOD_REF:-main}
profiles: ["e2e"]
command:
- utreexod
- --regtest
- --datadir=/data
- --rpcuser=test
- --rpcpass=test
- --rpclisten=0.0.0.0:38332
- --listen=0.0.0.0:38333
- --utreexoproofindex
- --prune=0
expose:
- "38332"
- "38333"
tmpfs:
- /data
healthcheck:
test: ["CMD-SHELL", "curl --fail --silent --insecure --user test:test --header 'content-type: application/json' --data-binary '{\"jsonrpc\":\"1.0\",\"id\":\"health\",\"method\":\"getblockchaininfo\",\"params\":[]}' https://127.0.0.1:38332/ >/dev/null"]
interval: 2s
timeout: 2s
retries: 60
start_period: 5s
e2e-tests:
image: mcr.microsoft.com/dotnet/sdk:10.0
profiles: ["e2e"]
depends_on:
floresta:
condition: service_healthy
postgres:
condition: service_healthy
bitcoind:
condition: service_healthy
utreexod:
condition: service_healthy
working_dir: /workspace/btcpayserver-floresta-plugin
environment:
BTCPAYSERVER_PROJECT: /workspace/btcpayserver/BTCPayServer/BTCPayServer.csproj
E2E_POSTGRES: "User ID=postgres;Password=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=btcpayserver"
E2E_READY_TIMEOUT_SECONDS: "240"
E2E_BITCOIND_RPC: "server=http://bitcoind:43782;ceiwHEbqWI83:DwubwWsoo3"
E2E_BITCOIND_P2P_HOST: bitcoind
E2E_BITCOIND_P2P_PORT: "39388"
E2E_UTREEXOD_RPC_URL: https://utreexod:38332
E2E_UTREEXOD_RPC_USER: test
E2E_UTREEXOD_RPC_PASSWORD: test
E2E_UTREEXOD_P2P_HOST: utreexod
E2E_UTREEXOD_P2P_PORT: "38333"
FLORESTA_NETWORK: regtest
FLORESTA_REPLACE_BTCPAY_BACKEND: "true"
FLORESTA_RPC_URL: http://floresta:18442
FLORESTA_ELECTRUM_HOST: floresta
FLORESTA_ELECTRUM_PORT: "20001"
FLORESTA_ELECTRUM_TLS: "false"
FLORESTA_FILTERS_START_HEIGHT: "0"
FLORESTA_GAP_LIMIT: "100"
FLORESTA_FALLBACK_FEE_SAT_PER_VB: "1"
PLAYWRIGHT_HEADLESS: "true"
DOTNET_CLI_HOME: /tmp/dotnet-cli
NUGET_PACKAGES: /workspace/btcpayserver-floresta-plugin/.nuget/packages
DOTNET_TEST_UID: "${DOTNET_TEST_UID:-1000}"
DOTNET_TEST_GID: "${DOTNET_TEST_GID:-1000}"
volumes:
- .:/workspace/btcpayserver-floresta-plugin
- ${BTCPAYSERVER_REPO:-./submodules/btcpayserver}:/workspace/btcpayserver
command:
- bash
- -lc
- >
set -euo pipefail;
trap 'find /workspace/btcpayserver-floresta-plugin /workspace/btcpayserver -user root -exec chown ${DOTNET_TEST_UID:-1000}:${DOTNET_TEST_GID:-1000} {} + || true' EXIT;
dotnet build BTCPayServer.Plugins.Floresta.Tests/BTCPayServer.Plugins.Floresta.Tests.csproj
-m:1
-p:UseSharedCompilation=false
-p:RunAnalyzers=false
-p:EnableNETAnalyzers=false
-nr:false;
export PATH="$PATH:/tmp/dotnet-cli/.dotnet/tools:/root/.dotnet/tools";
if ! command -v playwright >/dev/null 2>&1; then
dotnet tool install --global Microsoft.Playwright.CLI;
fi;
playwright install chromium --with-deps;
dotnet test BTCPayServer.Plugins.Floresta.Tests/BTCPayServer.Plugins.Floresta.Tests.csproj
--no-build
--filter "Playwright=Playwright"
--logger "console;verbosity=normal"
-m:1
-p:UseSharedCompilation=false
-p:RunAnalyzers=false
-p:EnableNETAnalyzers=false
-nr:false