Skip to content

Commit e240041

Browse files
committed
docs: update documentation to use Docker Compose and .env
- Update Quick Start to use docker compose up -d - Add comprehensive .env.example with all options documented - Update all port references (8090 for P2P, 8080 for RPC) - Add Docker-based monitoring and troubleshooting commands - Add operations playbooks for Docker workflow
1 parent 460e392 commit e240041

File tree

4 files changed

+337
-53
lines changed

4 files changed

+337
-53
lines changed

.env.example

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,64 @@
1-
# Platform Chain Validator Configuration
2-
# Copy this file to .env and fill in your values
1+
# =============================================================================
2+
# Platform Validator Configuration
3+
# =============================================================================
4+
# Copy this file to .env and configure your validator.
5+
#
6+
# Usage:
7+
# cp .env.example .env
8+
# nano .env # Edit with your values
9+
# docker compose up -d
10+
# =============================================================================
311

4-
# REQUIRED: Your validator secret key (hex encoded 32 bytes or BIP39 mnemonic)
5-
VALIDATOR_SECRET_KEY=your_secret_key_here
12+
# -----------------------------------------------------------------------------
13+
# REQUIRED: Validator Secret Key
14+
# -----------------------------------------------------------------------------
15+
# Your validator hotkey as a BIP39 mnemonic (24 words).
16+
# This must match the hotkey registered on the Bittensor subnet.
17+
#
18+
# Example:
19+
# VALIDATOR_SECRET_KEY=word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 word14 word15 word16 word17 word18 word19 word20 word21 word22 word23 word24
20+
#
21+
VALIDATOR_SECRET_KEY=
622

7-
# Optional: Slack webhook for Watchtower notifications
23+
# -----------------------------------------------------------------------------
24+
# Network Configuration (Optional)
25+
# -----------------------------------------------------------------------------
26+
# Subnet UID (default: 100)
27+
# NETUID=100
28+
29+
# Bittensor RPC endpoint
30+
# SUBTENSOR_ENDPOINT=wss://entrypoint-finney.opentensor.ai:443
31+
32+
# -----------------------------------------------------------------------------
33+
# Port Configuration (Optional)
34+
# -----------------------------------------------------------------------------
35+
# JSON-RPC API port (default: 8080)
36+
# RPC_PORT=8080
37+
38+
# P2P libp2p port (default: 8090)
39+
# P2P_PORT=8090
40+
41+
# -----------------------------------------------------------------------------
42+
# P2P Configuration (Optional)
43+
# -----------------------------------------------------------------------------
44+
# Run integrated bootnode (default: false)
45+
# WITH_BOOTNODE=true
46+
# BOOTNODE_PORT=8090
47+
48+
# Public IP for P2P announcements (auto-detected if not set)
49+
# EXTERNAL_IP=1.2.3.4
50+
51+
# Bootstrap peers (auto-discovered from Bittensor if not set)
52+
# BOOTSTRAP_PEERS=/ip4/1.2.3.4/tcp/8090/p2p/12D3KooW...
53+
54+
# -----------------------------------------------------------------------------
55+
# Logging (Optional)
56+
# -----------------------------------------------------------------------------
57+
# Log level: error, warn, info, debug, trace
58+
# RUST_LOG=info,validator_node=debug,platform_p2p_consensus=info
59+
60+
# -----------------------------------------------------------------------------
61+
# Notifications (Optional)
62+
# -----------------------------------------------------------------------------
63+
# Slack webhook for Watchtower update notifications
864
# SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/xxx/xxx

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,34 @@ flowchart TB
150150

151151
## Quick Start (Validator)
152152

153+
### Using Docker Compose (Recommended)
154+
153155
```bash
154156
git clone https://github.com/PlatformNetwork/platform.git
155157
cd platform
158+
159+
# Configure environment
156160
cp .env.example .env
157-
# Edit .env: add your VALIDATOR_SECRET_KEY (BIP39 mnemonic)
158-
mkdir -p data
159-
cargo build --release --bin validator-node
160-
./target/release/validator-node --data-dir ./data --secret-key "${VALIDATOR_SECRET_KEY}"
161+
# Edit .env and set your VALIDATOR_SECRET_KEY (BIP39 mnemonic)
162+
nano .env
163+
164+
# Start validator
165+
docker compose up -d
166+
167+
# View logs
168+
docker compose logs -f validator
161169
```
162170

171+
### Environment Variables
172+
173+
| Variable | Description | Required |
174+
|----------|-------------|----------|
175+
| `VALIDATOR_SECRET_KEY` | BIP39 mnemonic (24 words) | Yes |
176+
| `NETUID` | Subnet UID (default: 100) | No |
177+
| `SUBTENSOR_ENDPOINT` | Bittensor RPC endpoint | No |
178+
| `RPC_PORT` | RPC API port (default: 8080) | No |
179+
| `P2P_PORT` | P2P port (default: 8090) | No |
180+
163181
See [Validator Operations](docs/operations/validator.md) for hardware, configuration, and monitoring.
164182

165183
---

0 commit comments

Comments
 (0)