-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (56 loc) · 2.07 KB
/
docker-compose.yml
File metadata and controls
66 lines (56 loc) · 2.07 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
# =============================================================================
# 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
- "8090:8090" # P2P libp2p
volumes:
- validator-data:/data
environment:
- RUST_LOG=${RUST_LOG:-info,validator_node=debug}
- 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=8090
- WITH_BOOTNODE=${WITH_BOOTNODE:-true}
- BOOTNODE_PORT=8090
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:
driver: local