-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
163 lines (158 loc) · 5.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
163 lines (158 loc) · 5.2 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
services:
faircoind:
build:
context: .
dockerfile: Dockerfile.node
args:
# Pin a release for coordinated/consensus rollouts; empty => latest.
# One source of truth for every build path (manual or auto-updater).
FAIRCOIN_VERSION: v3.0.6
image: faircoin-node:latest
container_name: faircoin-node
restart: unless-stopped
network_mode: host
environment:
- PEER_IPS=${PEER_IPS:-}
volumes:
- faircoin-data:/data
command:
- -listen=1
- -server=1
- -rpcbind=0.0.0.0
- -rpcallowip=0.0.0.0/0
- -rpcport=${RPC_PORT:-40405}
- -rpcuser=${RPC_USER:-fair}
# Fail closed: never start the node with the placeholder password.
- -rpcpassword=${RPC_PASS:?RPC_PASS is required (set a strong value in .env)}
- -maxconnections=64
# Treat the long-running chain tip as current so a node that was offline
# does not trap itself in initial-block-download (FairCoin IBD self-deadlock).
- -maxtipage=315360000
# Address/tx indexes (added in v3.0.6) so the explorer's address pages and the
# MCP wallet tools work on mainnet. -reindex is required ONCE to build the index
# over existing blocks; removed in a follow-up after the first successful reindex.
- -addressindex=1
- -txindex=1
- -spentindex=1
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# === FairCoin TESTNET (a COMPLETELY SEPARATE chain) ===
# Two testnet nodes run beside the mainnet daemon: separate genesis, network
# magic, ports and data volumes. They use a CUSTOM binary (v3.0.5-testnet5)
# whose block-1 premine is mainnet-only, so a fresh testnet chain can be mined
# (the stock binary's miner pays the 5M premine but consensus rejects it). The
# custom image is tagged distinctly so it can never overwrite mainnet's
# faircoin-node:latest. PoS staking requires >=1 peer (the staker sleeps while
# vNodes is empty), so the two nodes peer with each other over localhost.
# Primary testnet node — mines the PoW phase, stakes, and is the RPC the
# Explorer reads (FAIRCOIN_TESTNET_RPC_* -> vps1:40406).
faircoind-testnet:
build:
context: .
dockerfile: Dockerfile.node
args:
FAIRCOIN_VERSION: v3.0.5-testnet5
image: faircoin-testnet-node:v3.0.5-testnet5
container_name: faircoin-node-testnet
restart: unless-stopped
network_mode: host
environment:
- PEER_IPS=
mem_limit: 768m
volumes:
- faircoin-testnet-data:/data
command:
- -testnet
- -listen=1
- -server=1
- -rpcbind=0.0.0.0
- -rpcallowip=0.0.0.0/0
- -rpcport=${TESTNET_RPC_PORT:-40406}
- -rpcuser=${RPC_USER:-fair}
# Fail closed: never start the node with the placeholder password.
- -rpcpassword=${RPC_PASS:?RPC_PASS is required (set a strong value in .env)}
- -maxconnections=64
- -maxtipage=315360000
# Address/tx indexes so the MCP wallet tools can resolve an arbitrary
# address's balance and UTXOs (getaddressbalance / getaddressutxos) — needed
# for non-custodial send/sweep. Built from genesis on the fresh volume.
- -addressindex=1
- -txindex=1
- -spentindex=1
# Peer with the companion so PoS staking can activate (needs >=1 connection).
- -addnode=127.0.0.1:46378
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# Companion testnet node — exists only to give the primary a peer connection so
# PoS can stake. No external exposure: RPC bound to localhost, P2P on 46378.
faircoind-testnet-peer:
build:
context: .
dockerfile: Dockerfile.node
args:
FAIRCOIN_VERSION: v3.0.5-testnet5
image: faircoin-testnet-node:v3.0.5-testnet5
container_name: faircoin-node-testnet-peer
restart: unless-stopped
network_mode: host
environment:
- PEER_IPS=
mem_limit: 512m
volumes:
- faircoin-testnet-peer-data:/data
command:
- -testnet
- -listen=1
- -server=1
- -rpcbind=127.0.0.1
- -rpcallowip=127.0.0.1
- -rpcport=40407
- -rpcuser=${RPC_USER:-fair}
- -rpcpassword=${RPC_PASS:?RPC_PASS is required (set a strong value in .env)}
- -port=46378
- -maxconnections=64
- -maxtipage=315360000
- -addnode=127.0.0.1:46374
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
dnsseed:
build:
context: .
dockerfile: Dockerfile
image: faircoin-seeder:latest
container_name: faircoin-seeder
restart: unless-stopped
network_mode: host
depends_on:
faircoind:
condition: service_started
environment:
- PEER_IPS=${PEER_IPS:-}
volumes:
- dnsseed-data:/var/lib/dnsseed
command:
- -h
- ${SEED_HOST:?SEED_HOST is required (e.g. seed1.fairco.in)}
- -n
- ${NS_HOST:?NS_HOST is required (e.g. vps1.fairco.in)}
- -m
- ${MBOX:-admin.fairco.in}
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
faircoin-data:
faircoin-testnet-data:
faircoin-testnet-peer-data:
dnsseed-data: