mempool/docker
2022-01-10 21:10:58 -08:00
..
backend Set statistics to enabled by default 2022-01-10 16:10:34 -08:00
data Add the empty directories needed by docker-compose 2022-01-10 20:31:36 -08:00
electrum fixes to the electrum Dockerfile 2021-03-24 16:24:04 -07:00
frontend Set Dockerfiles to use Node v16.10.0 2021-12-06 23:52:23 -08:00
mysql/data Add the empty directories needed by docker-compose 2022-01-10 20:31:36 -08:00
scripts Add script to pull digests from docker images (#705) 2021-08-27 19:04:51 +09:00
docker-compose.yml Update the reference docker-compose.yml file 2022-01-10 21:09:06 -08:00
init.sh Re-implement Docker workflow using GitHub Actions (#326) 2021-02-10 22:51:01 +09:00
README.md Update Docker README file 2022-01-10 21:10:58 -08:00

Docker

This directory contains the Dockerfiles used to build and release the official images and a docker-compose.yml file that is intended for end users to run a Mempool instance with minimal effort.

Basic setup

To run an instance with the default settings, use the following command:

$ docker-compose up

The default configuration will allow you to run Mempool using bitcoind as the backend, so address lookups will be disabled.

You can check if the instance is running by visiting http://localhost - the graphs will be populated as new transactions are detected.

Advanced setup

In order to run with electrum/electrs as the backend you will need to make the following changes to the docker-compose.yml file:

  • Under the api service, change the value of MEMPOOL_BACKEND key from none to electrum:
  api:
    environment:
      MEMPOOL_BACKEND: "none"
  • Under the api service, set the ELECTRUM_HOST and ELECTRUM_PORT keys to your Docker host ip address and set ELECTRUM_TLS_ENABLED to false:
  api:
    environment:
      ELECTRUM_HOST: "172.27.0.1"
      ELECTRUM_PORT: "50002"
      ELECTRUM_TLS: "false"

You can update any of the settings in the mempool-config.json file using the environment variables to override. Refer to the start.sh script for a list of variables and their default values.

Troubleshooting

If you already have something running on port 80, change it to something else under the web service section.

If you get stuck on "loading blocks", this means the websocket can't connect.

If you can't connect to the bitcoind RPC server, check your firewall settings and your bitcoin.conf file, it should contain at least these settings:

rpcallowip=0.0.0.0/0
rpcuser=mempool
rpcpassword=mempool
bind=0.0.0.0:8333
rpcbind=0.0.0.0:8332

If you can't connect to electrum/electrs, check your firewall settings and the IP you entered.

If you see a permission denied error coming from the database container, check your filesystem. The cache files generated by the backend will be stored in the ./data directory and the database will be stored in the ./mysql/data directory relative to the location of the docker-compose.yml file. If you move it somewhere, the paths will have to be updated and/or recreated.