-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f95afc4
commit 49dd0bf
Showing
3 changed files
with
220 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set_relay_name() { | ||
echo "If you are operating a relay node you need to set a relay name in accordance with the naming convention." | ||
echo "The relay name should be in the format: <your initials>-<provider-code>-<iso-3166-alpha2-country-code>-<supported-iata-airport-code>-<your-chosen-identifier>" | ||
echo "Example: hs-htz-us-iad-002" | ||
echo "Supported IATA airport codes can be found here: https://github.com/grafana/grafana/blob/main/public/gazetteer/airports.geojson" | ||
# shellcheck disable=SC2162 | ||
read -p "Relay name: " VOINETWORK_TELEMETRY_NAME | ||
} | ||
|
||
set_relay_name | ||
## Add check to only use if relay profile is running | ||
|
||
bash -c "env VOINETWORK_RELAY_NAME=\"${VOINETWORK_TELEMETRY_NAME}\" docker stack deploy -c ${HOME}/voi/docker/relay.yml voinetwork" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
version: "3.9" | ||
services: | ||
relay: | ||
image: ghcr.io/voinetwork/docker-relay-node:latest | ||
hostname: ${VOINETWORK_RELAY_NAME} | ||
volumes: | ||
- /var/lib/voi/algod/data:/algod/data/:rw | ||
ports: | ||
- published: 5011 | ||
target: 8080 | ||
protocol: tcp | ||
mode: host | ||
networks: | ||
- notification | ||
deploy: | ||
replicas: 1 | ||
restart_policy: | ||
condition: on-failure | ||
node-exporter: | ||
image: ghcr.io/voinetwork/docker-relay-node:latest | ||
hostname: ${VOINETWORK_RELAY_NAME} | ||
environment: | ||
- GOGC=25 | ||
volumes: | ||
- /var/lib/voi/algod/metrics:/algod/metrics/:rw | ||
ports: | ||
- published: 9100 | ||
target: 8080 | ||
protocol: tcp | ||
mode: host | ||
networks: | ||
- notification | ||
deploy: | ||
replicas: 1 | ||
restart_policy: | ||
condition: on-failure | ||
entrypoint: | ||
- "/node/bin/start-metrics" | ||
shepherd: | ||
image: containrrr/shepherd | ||
environment: | ||
RUN_ONCE_AND_EXIT: "true" | ||
ROLLBACK_ON_FAILURE: "true" | ||
IMAGE_AUTOCLEAN_LIMIT: "5" | ||
logging: | ||
driver: "local" | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
deploy: | ||
replicas: 0 | ||
restart_policy: | ||
condition: none | ||
labels: | ||
- swarm.cronjob.enable=false | ||
- swarm.cronjob.schedule=0 */4 * * * | ||
- swarm.cronjob.skip-running=true | ||
placement: | ||
constraints: | ||
- node.role == manager | ||
scheduler: | ||
image: ghcr.io/voinetwork/swarm-cronjob:edge | ||
logging: | ||
driver: "local" | ||
environment: | ||
- "TZ=UTC" | ||
- "LOG_LEVEL=info" | ||
- "LOG_JSON=false" | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
deploy: | ||
placement: | ||
constraints: | ||
- node.role == manager | ||
networks: | ||
notification: |
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