-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (62 loc) · 2.41 KB
/
docker-compose.yml
File metadata and controls
73 lines (62 loc) · 2.41 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
# =============================================================================
# Platform Validator Configuration
# =============================================================================
# Usage:
# cp .env.example .env
# # Edit .env with your VALIDATOR_SECRET_KEY
# docker compose up -d
# =============================================================================
services:
# ==========================================================================
# Platform Validator Node
# ==========================================================================
validator:
image: ghcr.io/platformnetwork/platform:latest
container_name: platform-validator
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "8080:8080" # JSON-RPC API
- "${P2P_PORT:-8090}:${P2P_PORT:-8090}" # P2P libp2p
volumes:
- validator-data:/data
environment:
- RUST_LOG=${RUST_LOG:-warn,validator_node=info,platform_bittensor=info,platform_p2p_consensus=warn,wasm_runtime_interface=warn,libp2p_kad=error,libp2p_gossipsub=error,tower_http=warn}
- DATA_DIR=/data
- VALIDATOR_SECRET_KEY=${VALIDATOR_SECRET_KEY}
- SUBTENSOR_ENDPOINT=${SUBTENSOR_ENDPOINT:-wss://entrypoint-finney.opentensor.ai:443}
- NETUID=${NETUID:-100}
- RPC_PORT=8080
- P2P_PORT=${P2P_PORT:-8090}
- WITH_BOOTNODE=${WITH_BOOTNODE:-true}
- BOOTNODE_PORT=${P2P_PORT:-8090}
- CHUTES_API_KEY=${CHUTES_API_KEY:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
dns:
- 8.8.8.8
- 1.1.1.1
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# ==========================================================================
# Watchtower - Auto-update validator
# ==========================================================================
watchtower:
image: nickfedor/watchtower@sha256:053e7ecba848b77eb5b966d236c2f4f2e1155e05007c9ef52418b4b7e255484b
container_name: platform-watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_SCHEDULE=0 */5 * * * *
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LOG_LEVEL=info
volumes:
validator-data:
external: true
name: platform_validator-data