Git Product home page Git Product logo

blockbook-dockerized's Introduction

blockbook-dockerized

Containerization of trezor/blockbook for bitcoin with Docker

Building docker images

$ docker-compose build bitcoin
$ docker-compose build blockbook

Running blockbook and its backend

  • bitcoin.conf file should be located under NODE_CONFIG directory before starting bitcoin service
  • If you want to change bitcoind's RPC credentials, you need to do it in Dockerfile.blockbook because the configuration file for blockbook is generated with blockbook's config generation tool here. However, due to the fact that RPC/zeromq ports are only exposed internally (not published, only docker services on the same machine can access), you actually don't need to worry about that your bitcoind's RPC is exposed to outside world.
  • As mentioned here, if you are running the containers in a system with less than 32G memory, set -worker=1 -dbcache=0 here in Dockerfile.blockbook. I haven't tested myself if the memory requirement goes up linearly with the number of workers set in blockbook options. However I achieved to sync blockbook with resources 12GB memory and 4GB swap on docker with a machine installed 16GB memory and -worker=2 -dbcache=0 options.
  • Also solid-state(high-speed) storage is highly recommended. Even though with the configuration aforementioned, full sync for bitcoin takes two weeks.

Run docker services

$ USER_ID=$UID NODE_DATA=/path/to/bitcoin/data/dir/of/your/convenience \
  NODE_CONFIG=/path/to/bitcoin/config/dir/of/your/convenience \
  BLOCKBOOK_DATA=/path/to/blockbook/data/dir/of/your/convenience \ 
  docker-compose up -d

# To see the logs separately
$ docker-compose logs blockbook
$ docker-compose logs bitcoin

Todos

  • Add build variables to blockbook service in order to set bitcoind's RPC credentials to anything other than the defualt
  • Move out blockchainconf file off the builder of blockbook. Instead use volume binding to configuration file

blockbook-dockerized's People

Contributors

psychoplasma avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.