-
-
Save Beasta/8e3825d24229cabcc95e1b1024397892 to your computer and use it in GitHub Desktop.
helium validator + watchtower (with consensus check) + exporter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# launch: docker-compose up -d | |
version: "3.7" | |
services: | |
validator: | |
image: quay.io/team-helium/validator:latest-validator-amd64 | |
container_name: validator | |
init: true | |
restart: always | |
ports: | |
- "2154:2154" | |
- "8080:8080" | |
- "127.0.0.1:4467:4467" # jsonrpc | |
volumes: | |
- "${HOME}/validator_data/:/var/data" | |
labels: | |
"com.centurylinklabs.watchtower.lifecycle.pre-update": > | |
sh -c 'while [ "$$(miner info in_consensus)" == "true" ]; do echo "in consensus, loop-waiting"; sleep 30; done' | |
"com.centurylinklabs.watchtower.lifecycle.pre-update-timeout": 43200 # 12hrs should be longer than a validator is in the consensus group. | |
val_watchtower: | |
image: containrrr/watchtower:latest | |
container_name: val_watchtower | |
restart: always | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
command: validator miner_exporter # the container name(s) to monitor | |
environment: | |
- WATCHTOWER_POLL_INTERVAL=600 # check for new image every 10 minutes | |
- WATCHTOWER_LIFECYCLE_HOOKS=true | |
#- WATCHTOWER_DEBUG=true # uncomment to see watchtower waiting for consensus | |
miner_exporter: | |
image: ghcr.io/tedder/miner_exporter:latest | |
container_name: miner_exporter | |
restart: always | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
ports: | |
- "127.0.0.1:9825:9825" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment