Skip to content

Commit

Permalink
Monero Exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaine95 committed Feb 25, 2023
1 parent 15ada04 commit 2415680
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 @@ -24,6 +24,14 @@ RUN case "$(uname -m)" in \
&& tar -xjvf monero-linux-${ARCH}-${MONERO_VERSION}.tar.bz2 --strip-components 1 \
&& rm -f monero-linux-${ARCH}-${MONERO_VERSION}.tar.bz2


##################
# -- 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 @@ -44,10 +52,12 @@ RUN apt-get update && \
chown -R monero:monero /opt/bitmonero

COPY --from=builder /opt/monero/* /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 "$@"

0 comments on commit 2415680

Please sign in to comment.