Merge pull request #254 from sethforprivacy/patch-2

Fix Dockerfile CMD/entrypoint
master
moneroexamples 3 years ago committed by GitHub
commit f677a35843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,7 +90,7 @@ VOLUME /home/monero/.bitmonero
# Expose default explorer http port # Expose default explorer http port
EXPOSE 8081 EXPOSE 8081
ENTRYPOINT ["/bin/sh", "-c", "./xmrblocks"] ENTRYPOINT ["/bin/sh", "-c"]
# Set sane defaults that are overridden if the user passes any commands # 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"]

@ -213,6 +213,7 @@ services:
- xmrdata:/home/monero/.bitmonero - xmrdata:/home/monero/.bitmonero
ports: ports:
- 8081:8081 - 8081:8081
command: ["./xmrblocks --daemon-url=monerod:18089 --enable-json-api --enable-autorefresh-option --enable-emission-monitor --enable-pusher"]
volumes: volumes:
xmrdata: 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' 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 <path-to-monero-blockckain-on-the-host>:/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 <path-to-monero-blockchain-on-the-host>:/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 ## Enable Monero emission
Obtaining current Monero emission amount is not straight forward. Thus, by default it is Obtaining current Monero emission amount is not straight forward. Thus, by default it is

Loading…
Cancel
Save