big refactor, add makefile, update dashboard, use nocompile option
parent
288ec0722c
commit
1bbc059f00
@ -1,11 +0,0 @@
|
||||
FROM node:8
|
||||
|
||||
WORKDIR /opt/monerod_exporter
|
||||
|
||||
RUN git clone https://github.com/ExcitableAardvark/monerod_exporter.git --branch=master --depth=1 .
|
||||
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["node", "index.js"]
|
@ -0,0 +1,19 @@
|
||||
.PHONY: format help
|
||||
|
||||
# Help system from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
help:
|
||||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
up: ## Build and run the required containers by fetching binaries
|
||||
docker-compose -f docker-compose.yaml up -d
|
||||
|
||||
build: ## Build the required containers by fetching binaries
|
||||
docker-compose -f docker-compose.yaml build --no-cache
|
||||
|
||||
down: ## Stop the containers
|
||||
docker-compose -f docker-compose.yaml down
|
||||
|
||||
logs: ## Get logs from the containers
|
||||
docker-compose -f docker-compose.yaml logs -f
|
@ -0,0 +1,11 @@
|
||||
FROM node:8
|
||||
|
||||
WORKDIR /opt/wownerod_exporter
|
||||
|
||||
RUN git clone https://github.com/lalanza808/monerod_exporter.git --branch=master --depth=1 .
|
||||
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["node", "index.js"]
|
@ -0,0 +1,40 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV WOWNERO_HASH 44d654d8ccff8d98dcecc778873345c42d069dfa12e8d83acc9d787de7920387
|
||||
ENV WOWNERO_DL_URL https://git.wownero.com/attachments/6b7f2b29-dd0a-47d0-93ae-387f1a4e4adb
|
||||
ENV WOWNERO_DL_FILE wownero.tar.bz2
|
||||
ENV WOWNERO_SUMS_FILE sha256sums
|
||||
|
||||
WORKDIR /opt/wownero
|
||||
|
||||
# Update system and install dependencies
|
||||
# Download Wownero binaries from Gitea
|
||||
# Confirm hashes match
|
||||
# Install daemon binary
|
||||
# Clean up
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y tar wget
|
||||
|
||||
RUN wget -qO ${WOWNERO_DL_FILE} ${WOWNERO_DL_URL} \
|
||||
&& echo "${WOWNERO_HASH} ${WOWNERO_DL_FILE}" > ${WOWNERO_SUMS_FILE} \
|
||||
&& sha256sum -c ${WOWNERO_SUMS_FILE}; \
|
||||
if [ "$?" -eq 0 ]; \
|
||||
then \
|
||||
echo -e "[+] Hashes match - proceeding with container build"; \
|
||||
else \
|
||||
echo -e "[!] Hashes do not match - exiting"; \
|
||||
exit 5; \
|
||||
fi \
|
||||
&& mkdir ./tmp \
|
||||
&& tar xjf ${WOWNERO_DL_FILE} -C ./tmp --strip 1 \
|
||||
&& mv ./tmp/* /usr/local/bin/ \
|
||||
&& rm -rf ./tmp ${WOWNERO_SUMS_FILE} ${WOWNERO_DL_FILE}
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 18080
|
||||
EXPOSE 18081
|
||||
EXPOSE 18082
|
||||
EXPOSE 18083
|
Loading…
Reference in New Issue