-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (66 loc) · 1.52 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
version: '3.8'
services:
validator:
build:
context: .
args:
USER: validator
USER_ID: 1000
GROUP_ID: 1000
ports:
- "5000:5000"
volumes:
- validator_data:/app/data
- validator_logs:/app/logs
environment:
- BITCOIN_RPC_HOST=bitcoin
- BITCOIN_RPC_PORT=18443
- BITCOIN_RPC_USER=${BITCOIN_RPC_USER:-user}
- BITCOIN_RPC_PASSWORD=${BITCOIN_RPC_PASSWORD:-password}
- SECRET_KEY=${SECRET_KEY:-change-this-in-production}
- PYTHONPATH=/app
depends_on:
- bitcoin
networks:
- validator_net
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
bitcoin:
image: ruimarinho/bitcoin-core:latest
command:
-regtest=1
-server=1
-rpcallowip=0.0.0.0/0
-rpcbind=0.0.0.0
-rpcuser=${BITCOIN_RPC_USER:-user}
-rpcpassword=${BITCOIN_RPC_PASSWORD:-password}
-fallbackfee=0.0002
-txindex=1
-debug=1
-printtoconsole=1
ports:
- "18443:18443"
volumes:
- bitcoin_data:/home/bitcoin/.bitcoin
networks:
- validator_net
restart: unless-stopped
healthcheck:
test: ["CMD", "bitcoin-cli", "-regtest", "getblockchaininfo"]
interval: 30s
timeout: 10s
retries: 3
networks:
validator_net:
driver: bridge
volumes:
validator_data:
driver: local
validator_logs:
driver: local
bitcoin_data:
driver: local