Giter Club home page Giter Club logo

blockbook-docker's Introduction

Blockbook Docker

Docker container for Blockbook, the Trezor wallet backend.

To run, just pass the RPC details (user, pass, rpc host, rpc port and zmq socket port) from your Bitcoin full node as env variables:

docker run --name blockbook -it -p 9030:9030 -p 9130:9130 -e RPC_USER=myuser -e RPC_PASS=pass \
-e RPC_HOST=10.1.2.3 -e  MQ_PORT=29000 gustavonalle/blockbook

It will start syncing and the progress can be checked at https://localhost:9130

In your Trezor wallet, go to "Wallet Settings" and in the "Bitcore Server URL" put the URL above.

Stopping gracefully

To stop the container gracefully (and have the database files preserved), do a docker stop -t 60 blockbook and to restart it later, docker start blockbook.

Custom launcher

When using the command above to launch, the docker container will automatically generate the config file and will use sensible parameters to run Blockbook with Bitcoin. If more control is desired, like using custom flags, custom configuration files, or using any shitcoin supported by Blockbook, just override the entrypoint:

 docker run -v $PWD/cfg:/home/blockbook/cfg -w=/home/blockbook/go/src/blockbook -it -p 9130:9130 \
 -p 9030:9030 --entrypoint=/home/blockbook/go/src/blockbook/blockbook gustavonalle/blockbook \ 
 -sync -blockchaincfg=/home/blockbook/cfg/cfg.json -workers=10  -logtostderr

The command above will run blockbook with 10 workers, using a custom configuration file called cfg.json, which will come from a volume mapping the local folder cfg to /home/blockbook/cfg inside the container.

blockbook-docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

obyno1010 zekylaf

blockbook-docker's Issues

incompatible lz4 when make rocksdb

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/8/../../../liblz4.so when searching for -llz4
/usr/bin/ld: skipping incompatible //lib/liblz4.so when searching for -llz4
/usr/bin/ld: skipping incompatible //usr/lib/liblz4.so when searching for -llz4
/usr/bin/ld: cannot find -llz4
collect2: error: ld returned 1 exit status

this happens when the docker try to make rocksdb

Permission Denied: ./data

I1018 09:47:03.946040       1 mq.go:60] MQ listening to tcp://bitcoin:28332
I1018 09:47:03.946054       1 mempool_bitcoin_type.go:60] mempool: starting with 1*1 sync workers
I1018 09:47:03.946093       1 bitcoinrpc.go:146] rpc: block chain mainnet
I1018 09:47:03.946132       1 rocksdb.go:103] rocksdb: opening ./data, required data version 4, cache size 536870912, max open files 16384
F1018 09:47:03.947054       1 blockbook.go:171] rocksDB: IO error: While mkdir if missing: ./data: Permission denied
I1018 09:48:05.112743       1 blockbook.go:134] Blockbook: {Version:master GitCommit:e27821f BuildTime:2019-01-27T18:31:39+00:00 GoVersion:go1.11.4 OSArch:linux/amd64}, debug mode false

Hi,

I can't get the container up and running. Does the above message mean anything to you?

Thanks.

Compose file:

  blockbook:
    container_name: blockbook
    image: gustavonalle/blockbook
    restart: always
    entrypoint:
      - /home/blockbook/go/src/blockbook/blockbook
      - -sync
      - -blockchaincfg=/home/blockbook/cfg/cfg.json
      - -workers=10
      - -logtostderr
    ports:
      - "9030:9030"
      - "9130:9130"
    volumes:
      - "<snip>/data/blockbook/cfg:/home/blockbook/cfg"

Config file:

{
"coin_name": "Bitcoin",
"coin_shortcut": "BTC",
"coin_label": "Bitcoin",
"rpc_url": "http://bitcoin:8332",
"rpc_user": "snip",
"rpc_pass": "snip",
"rpc_timeout": 25,
"parse": true,
"message_queue_binding": "tcp://bitcoin:28332", (bitcoin-core)
"subversion": "",
"address_format": "",
"block_addresses_to_keep": 300
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.