Skip to content

Commit

Permalink
Monero Exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaine95 committed Aug 12, 2022
1 parent cdad347 commit 229c277
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ RUN case "$(uname -m)" in \
*) echo "Unexpected architecture: $(uname -m)" && exit 1;; \
esac


##################
# -- exporter -- #
##################
FROM docker.io/golang:1.19 AS exporter

RUN GO111MODULE=on go install github.com/cirocosta/monero-exporter/cmd/monero-exporter@master

##################
# --- runner --- #
##################
Expand All @@ -86,10 +94,12 @@ RUN apt-get update && \
chown -R monero:monero /opt/bitmonero

COPY --from=builder /opt/monero/build/Linux/_no_branch_/release/bin/* /opt/monero/
COPY --from=exporter /go/bin/monero-exporter /opt/monero/monero-exporter
COPY ./entrypoint.sh /entrypoint.sh

USER monero
WORKDIR /home/monero
VOLUME /opt/bitmonero
EXPOSE 18080 18081

ENTRYPOINT ["tini", "--" ,"/opt/monero/monerod"]
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
9 changes: 9 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

/opt/monero/monero-exporter \
--bind-addr "${EXPORTER_BIND:-":9000"}" \
--monero-addr "http://127.0.0.1:18081" \
--telemetry-path "${EXPORTER_PATH:-"/metrics"}" &

/opt/monero/monerod "${MONEROD_ARGS}"

0 comments on commit 229c277

Please sign in to comment.