|
| 1 | +version: "3.8" |
| 2 | + |
| 3 | +# ============================================================================= |
| 4 | +# Platform Network - Bootnode Configuration |
| 5 | +# ============================================================================= |
| 6 | +# Run this validator as the network bootnode (no --bootstrap argument) |
| 7 | +# Other validators connect to this node via bootnode.platform.network:9000 |
| 8 | +# |
| 9 | +# Usage: |
| 10 | +# export VALIDATOR_SECRET_KEY="your-hotkey-mnemonic-or-hex-seed" |
| 11 | +# docker compose -f docker-compose.bootnode.yml up -d |
| 12 | +# ============================================================================= |
| 13 | + |
| 14 | +services: |
| 15 | + # ========================================================================== |
| 16 | + # Platform Bootnode Validator |
| 17 | + # ========================================================================== |
| 18 | + validator: |
| 19 | + image: ghcr.io/platformnetwork/platform:latest |
| 20 | + container_name: platform-validator |
| 21 | + restart: unless-stopped |
| 22 | + privileged: true |
| 23 | + |
| 24 | + # Enable Watchtower auto-update |
| 25 | + labels: |
| 26 | + - "com.centurylinklabs.watchtower.enable=true" |
| 27 | + |
| 28 | + ports: |
| 29 | + - "8080:8080" # RPC API |
| 30 | + - "9000:9000" # P2P Network (bootnode listens here) |
| 31 | + |
| 32 | + volumes: |
| 33 | + - validator-data:/data |
| 34 | + - /var/run/docker.sock:/var/run/docker.sock |
| 35 | + |
| 36 | + environment: |
| 37 | + - RUST_LOG=info,platform_chain=debug,platform_rpc=info,platform_consensus=debug,challenge_orchestrator=info,validator_node=debug |
| 38 | + - RUST_BACKTRACE=1 |
| 39 | + - DATA_DIR=/data |
| 40 | + - VALIDATOR_SECRET_KEY=${VALIDATOR_SECRET_KEY:?VALIDATOR_SECRET_KEY is required} |
| 41 | + - VALIDATOR_NAME=platform-bootnode |
| 42 | + - SENTRY_DSN=${SENTRY_DSN:-} |
| 43 | + |
| 44 | + # No --bootstrap = this IS the bootnode |
| 45 | + # Other validators will connect to bootnode.platform.network:9000 |
| 46 | + command: > |
| 47 | + /app/validator-node |
| 48 | + --data-dir /data |
| 49 | + --rpc-port 8080 |
| 50 | + --listen /ip4/0.0.0.0/tcp/9000 |
| 51 | + --netuid 100 |
| 52 | + --subtensor-endpoint wss://entrypoint-finney.opentensor.ai:443 |
| 53 | + --epoch-length 360 |
| 54 | + --sudo-key 50780547322a1ceba67ea8c552c9bc6c686f8698ac9a8cafab7cd15a1db19859 |
| 55 | + |
| 56 | + healthcheck: |
| 57 | + test: ["CMD", "curl", "-sf", "http://localhost:8080/health"] |
| 58 | + interval: 30s |
| 59 | + timeout: 10s |
| 60 | + retries: 3 |
| 61 | + start_period: 60s |
| 62 | + |
| 63 | + networks: |
| 64 | + - platform-network |
| 65 | + |
| 66 | + # ========================================================================== |
| 67 | + # Watchtower - Auto-update platform container |
| 68 | + # ========================================================================== |
| 69 | + watchtower: |
| 70 | + image: nickfedor/watchtower@sha256:053e7ecba848b77eb5b966d236c2f4f2e1155e05007c9ef52418b4b7e255484b |
| 71 | + container_name: platform-watchtower |
| 72 | + restart: unless-stopped |
| 73 | + |
| 74 | + volumes: |
| 75 | + - /var/run/docker.sock:/var/run/docker.sock |
| 76 | + |
| 77 | + environment: |
| 78 | + - WATCHTOWER_LABEL_ENABLE=true |
| 79 | + - WATCHTOWER_SCHEDULE=0 */5 * * * * |
| 80 | + - WATCHTOWER_CLEANUP=true |
| 81 | + - WATCHTOWER_INCLUDE_STOPPED=false |
| 82 | + - WATCHTOWER_LOG_LEVEL=info |
| 83 | + |
| 84 | + networks: |
| 85 | + - platform-network |
| 86 | + |
| 87 | +volumes: |
| 88 | + validator-data: |
| 89 | + driver: local |
| 90 | + |
| 91 | +networks: |
| 92 | + platform-network: |
| 93 | + driver: bridge |
| 94 | + name: platform-network |
0 commit comments