forked from Casraw/bitcoin-ckpool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
109 lines (101 loc) · 2.73 KB
/
docker-compose.yaml
File metadata and controls
109 lines (101 loc) · 2.73 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
services:
bitcoin-ckpool:
build:
context: ckpool/
# For x86_64 builds:
args:
TARGETARCH: amd64
# Or for ARM64:
# args:
# TARGETARCH: arm64
container_name: bitcoin-ckpool
# Define environment variables to fill the config files at runtime:
environment:
# Bitcoin config
TESTNET: "0"
ALGO: "sha256d"
DAEMON: "1"
SERVER: "1"
TXINDEX: "0"
MAXCONNECTIONS: "300"
DISABLEWALLET: "0"
RPCALLOWIP: "0.0.0.0/0"
PORT: "8433"
RPCPORT: "8432"
RPCBIND: "0.0.0.0"
RPCUSER: "rpcuser"
RPCPASSWORD: "rpcpassword"
ONLYNET: "IPv4"
ZMQPUBHASHBLOCK: "tcp://127.0.0.1:28435"
DATADIR: "/home/cna.bitcoin/mainnet"
# ckpool config
BTCD_URL: "127.0.0.1:8432"
BTCD_AUTH: "rpcuser"
BTCD_PASS: "rpcpassword"
SERVERURL: "0.0.0.0:3333"
BTCADDRESS: "xxx"
BTCSIG: "/mined by me/"
BLOCKPOLL: "10"
DONATION: "0.0"
NONCE1LENGTH: "4"
NONCE2LENGTH: "8"
UPDATE_INTERVAL: "60"
VERSION_MASK: "1fffe000"
MINDIFF: "512"
STARTDIFF: "10000"
LOGDIR: "/logs"
ZMQBLOCK: "tcp://127.0.0.1:28435"
volumes:
- ./ckpool/data:/home/cna.bitcoin/mainnet
ports:
# Publish Bitcoin ports:
- "8435:8433" # p2p
# Publish Bitcoin RPC port:
- "8434:8432" # rpc
# Publish ckpool port (if you want to accept external connections for miners):
- "3334:3333"
# API port (for ckstats):
- "4029:4028"
# Web port (for ckstats):
- "4001:80"
db-bitcoin:
image: postgres:13
container_name: db-bitcoin
environment:
POSTGRES_USER: ckstats
POSTGRES_PASSWORD: ckstats
POSTGRES_DB: ckstats
volumes:
- ./db/data:/var/lib/postgresql/data
- ./db/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ckstats -t 20 && psql -U ckstats -d dbshadow -c 'SELECT 1' >/dev/null 2>&1"]
interval: 20s
timeout: 30s
retries: 5
ckstats-bitcoin:
build:
context: ckstats/
dockerfile: Dockerfile
# For x86_64 builds:
args:
TARGETARCH: amd64
# Or for ARM64:
# args:
# TARGETARCH: arm64
container_name: ckstats-bitcoin
depends_on:
db-bitcoin:
condition: service_healthy
environment:
DATABASE_URL: "postgres://ckstats:ckstats@db-bitcoin/ckstats"
SHADOW_DATABASE_URL: "postgres://ckstats:ckstats@db-bitcoin/dbshadow"
API_URL: "http://bitcoin-ckpool"
RPCUSER: "rpcuser"
RPCPASSWORD: "rpcpassword"
RPCPORT: "8432"
ports:
# Publish ckstats port:
- "4000:3000"