diff --git a/Dockerfile b/Dockerfile index 863d2ba..3fe2b82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,7 +90,7 @@ VOLUME /home/monero/.bitmonero # Expose default explorer http port EXPOSE 8081 -ENTRYPOINT ["/bin/sh", "-c", "./xmrblocks"] +ENTRYPOINT ["/bin/sh", "-c"] # Set sane defaults that are overridden if the user passes any commands -CMD ["--enable-json-api", "--enable-autorefresh-option", "--enable-emission-monitor", "--enable-pusher"] +CMD ["./xmrblocks --enable-json-api --enable-autorefresh-option --enable-emission-monitor --enable-pusher"] diff --git a/README.md b/README.md index c7ae3c6..10e9b9e 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,7 @@ services: - xmrdata:/home/monero/.bitmonero ports: - 8081:8081 + command: ["./xmrblocks --daemon-url=monerod:18089 --enable-json-api --enable-autorefresh-option --enable-emission-monitor --enable-pusher"] volumes: xmrdata: @@ -302,6 +303,18 @@ alias xmrblocksmainnet='~/onion-monero-blockchain-explorer/build/xmrblocks -- alias xmrblockstestnet='~/onion-monero-blockchain-explorer/build/xmrblocks -t --port 8082 --mainnet-url "http://139.162.32.245:8081" --enable-pusher --enable-emission-monitor' ``` +Example usage when running via Docker: + +```bash +# Run in foreground +docker run -it -v :/home/monero/.bitmonero -p 8081:8081 xmrblocks "./xmrblocks --daemon-url=node.sethforprivacy.com:18089 --enable-json-api --enable-autorefresh-option --enable-emission-monitor --enable-pusher" + +# Run in background +docker run -it -d -v :/home/monero/.bitmonero -p 8081:8081 xmrblocks "./xmrblocks --daemon-url=node.sethforprivacy.com:18089 --enable-json-api --enable-autorefresh-option --enable-emission-monitor --enable-pusher" +``` + +Make sure to always start the portion of command line flags with `./xmrblocks` and set any flags you would like after that, as shown above. + ## Enable Monero emission Obtaining current Monero emission amount is not straight forward. Thus, by default it is