-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (99 loc) · 4.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
102 lines (99 loc) · 4.13 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
# -----------------------------------------------------------------------------
# simplepool — docker-compose orchestration
# -----------------------------------------------------------------------------
# Runs the three simplepool services against a Thunder daemon that lives on
# the host (or wherever THUNDER_RPC_URL points). Bitcoin Core is likewise
# expected to be reachable from the simplepool container.
#
# Directory layout on the operator's box:
# deploy/docker/
# ├── docker-compose.yml (this file)
# ├── .env (copied from .env.example, edited)
# └── proxy.conf (copied from repo root proxy.conf.example)
# data/ (created on first run — holds shares.db)
#
# Bring the stack up:
# cd deploy/docker
# cp .env.example .env && $EDITOR .env
# cp ../../proxy.conf.example proxy.conf && $EDITOR proxy.conf
# docker compose up -d --build
#
# The simplepool container uses host networking so miners can reach :3334
# without NAT and so it can talk to bitcoind on 127.0.0.1. dashboard and
# payout use the default bridge and reach Thunder via host.docker.internal.
# -----------------------------------------------------------------------------
services:
simplepool:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile.simplepool
image: simplepool:latest
container_name: simplepool
restart: unless-stopped
# host mode: miners hit :3334 directly, and bitcoind_url in proxy.conf
# can point at 127.0.0.1 exactly like the bare-metal deploy.
network_mode: host
volumes:
- ../../data:/data
- ./proxy.conf:/etc/simplepool/proxy.conf:ro
stop_grace_period: 15s
dashboard:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile.dashboard
image: simplepool-dashboard:latest
container_name: simplepool-dashboard
restart: unless-stopped
ports:
- "${DASHBOARD_PORT:-8081}:8081"
environment:
PORT: "8081"
PROXY_DB_PATH: /data/shares.db
PUBLIC_STRATUM_URL: ${PUBLIC_STRATUM_URL:-stratum+tcp://<pool-host>:3334}
THUNDER_RPC_URL: ${THUNDER_RPC_URL:-http://host.docker.internal:6009}
POOL_THUNDER_RESERVE_ADDRESS: ${POOL_THUNDER_RESERVE_ADDRESS:-}
POOL_PPS_SATS_PER_DIFF: ${POOL_PPS_SATS_PER_DIFF:-1000}
ADMIN_USER: ${ADMIN_USER:-}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
# --- Write-action wiring ---
PAYOUT_ADMIN_URL: ${PAYOUT_ADMIN_URL:-http://host.docker.internal:9080}
ENFORCER_GRPC_ADDR: ${ENFORCER_GRPC_ADDR:-host.docker.internal:50051}
GRPCURL_BIN: ${GRPCURL_BIN:-/usr/local/bin/grpcurl}
THUNDER_SIDECHAIN_ID: ${THUNDER_SIDECHAIN_ID:-9}
volumes:
# Dashboard now writes to the deposits table when the operator
# submits a deposit via /admin. Mount RW.
- ../../data:/data
extra_hosts:
# Linux: makes host.docker.internal resolve to the host gateway.
# No-op on macOS/Windows where docker adds it natively.
- "host.docker.internal:host-gateway"
stop_grace_period: 10s
payout:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile.payout
image: simplepool-payout:latest
container_name: simplepool-payout
restart: unless-stopped
environment:
PAYOUT_DB_PATH: /data/shares.db
THUNDER_RPC_URL: ${THUNDER_RPC_URL:-http://host.docker.internal:6009}
THUNDER_FROM_ADDRESS: ${THUNDER_FROM_ADDRESS:-}
PAYOUT_MIN_SATS: ${PAYOUT_MIN_SATS:-10000}
PAYOUT_INTERVAL_MS: ${PAYOUT_INTERVAL_MS:-30000}
PAYOUT_DRY_RUN: ${PAYOUT_DRY_RUN:-0}
# Admin HTTP surface — dashboard reaches it at PAYOUT_ADMIN_URL.
# Bind to 0.0.0.0 (default) so the dashboard container can reach
# it via host.docker.internal:PAYOUT_ADMIN_PORT.
PAYOUT_ADMIN_BIND: ${PAYOUT_ADMIN_BIND:-0.0.0.0}
PAYOUT_ADMIN_PORT: ${PAYOUT_ADMIN_PORT:-9080}
ports:
# Expose the admin HTTP for the dashboard to hit. Loopback-only
# on the host is the sane default.
- "127.0.0.1:${PAYOUT_ADMIN_PORT:-9080}:9080"
volumes:
- ../../data:/data
extra_hosts:
- "host.docker.internal:host-gateway"
stop_grace_period: 30s