From 4722b5449317229ac50d2ac3d1dcb07bc988cc86 Mon Sep 17 00:00:00 2001 From: gusto Date: Mon, 29 Jan 2024 11:26:54 +0200 Subject: [PATCH] Use chat app as testnet bot (#568) --- compose.static.yml | 7 +++++++ testnet/Dockerfile | 1 + testnet/scripts/run_nomos_bot.sh | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100755 testnet/scripts/run_nomos_bot.sh diff --git a/compose.static.yml b/compose.static.yml index d0df5f78..0304b9b9 100644 --- a/compose.static.yml +++ b/compose.static.yml @@ -139,6 +139,13 @@ services: entrypoint: /usr/bin/mixnode command: /etc/nomos/mixnode_config.yaml + chatbot: + container_name: chatbot + build: + context: . + dockerfile: testnet/Dockerfile + entrypoint: /etc/nomos/scripts/run_nomos_bot.sh + etcd: container_name: etcd image: quay.io/coreos/etcd:v3.4.15 diff --git a/testnet/Dockerfile b/testnet/Dockerfile index b18997ba..6dea08d4 100644 --- a/testnet/Dockerfile +++ b/testnet/Dockerfile @@ -27,6 +27,7 @@ LABEL maintainer="augustinas@status.im" \ EXPOSE 3000 8080 9000 60000 COPY --from=builder /nomos/target/release/nomos-node /usr/bin/nomos-node +COPY --from=builder /nomos/target/release/nomos-cli /usr/bin/nomos-cli COPY --from=builder /nomos/target/release/mixnode /usr/bin/mixnode COPY --from=builder /usr/bin/etcdctl /usr/bin/etcdctl COPY nodes/nomos-node/config.yaml /etc/nomos/config.yaml diff --git a/testnet/scripts/run_nomos_bot.sh b/testnet/scripts/run_nomos_bot.sh new file mode 100755 index 00000000..2be7a276 --- /dev/null +++ b/testnet/scripts/run_nomos_bot.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "I am a container ${HOSTNAME} bot" + +while true +do + /usr/bin/nomos-cli chat --author nomos-ghost --message "$(date +%H:%M:%S) ~ ping" --network-config /etc/nomos/cli_config.yml --node-addr http://bootstrap:18080 + sleep 10 +done