Skip to content

Commit

Permalink
Merge pull request bisq-network#6981 from alvasw/add_regtest_mempool_…
Browse files Browse the repository at this point in the history
…setup

Add Mempool to Regtest Setup
  • Loading branch information
alejandrogarcia83 committed Dec 31, 2023
2 parents 5a3a707 + 54d4dab commit dfb5039
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ deploy
.localnet
/apitest/src/main/resources/dao-setup*
/.run
/regtest/data_dirs
68 changes: 68 additions & 0 deletions regtest/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: '3.7'

services:
electrumx:
image: bisq/electrumx
build: ./electrumx
volumes:
- ./data_dirs/electrumx:/root/electrumx/db_directory
environment:
- ALLOW_ROOT=yes
- SERVICES=tcp://:50001,rpc://
- COIN=Bitcoin
- NET=regtest
- DAEMON_URL=http://bisqdao:bsq@127.0.0.1:18443
- DB_DIRECTORY=/root/electrumx/db_directory
entrypoint: ./electrumx_server
network_mode: "host"

mempool-web:
environment:
FRONTEND_HTTP_PORT: "8080"
BACKEND_MAINNET_HTTP_HOST: "127.0.0.1"
image: mempool/frontend:latest
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
command: "./wait-for 127.0.0.1:3306 --timeout=720 -- nginx -g 'daemon off;'"
network_mode: "host"

mempool-api:
depends_on:
- electrumx
environment:
MEMPOOL_BACKEND: "electrum"
CORE_RPC_HOST: "127.0.0.1"
CORE_RPC_PORT: "18443"
CORE_RPC_USERNAME: "bisqdao"
CORE_RPC_PASSWORD: "bsq"
ELECTRUM_HOST: "127.0.0.1"
ELECTRUM_PORT: "50001"
ELECTRUM_TLS_ENABLED: "false"
DATABASE_ENABLED: "true"
DATABASE_HOST: "127.0.0.1"
DATABASE_DATABASE: "mempool"
DATABASE_USERNAME: "mempool"
DATABASE_PASSWORD: "mempool"
STATISTICS_ENABLED: "true"
image: mempool/backend:latest
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
command: "./wait-for-it.sh 127.0.0.1:3306 --timeout=720 --strict -- ./start.sh"
volumes:
- ./data_dirs/mempool-api:/backend/cache
network_mode: "host"

mempool-db:
environment:
MYSQL_DATABASE: "mempool"
MYSQL_USER: "mempool"
MYSQL_PASSWORD: "mempool"
MYSQL_ROOT_PASSWORD: "admin"
image: mariadb:10.5.8
restart: on-failure
stop_grace_period: 1m
volumes:
- ./data_dirs/mempool-mysql:/var/lib/mysql
network_mode: "host"
10 changes: 10 additions & 0 deletions regtest/electrumx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3

WORKDIR /root

RUN git clone https://github.com/spesmilo/electrumx.git && \
cd electrumx && \
pip3 install . && \
mkdir db_directory

WORKDIR /root/electrumx

0 comments on commit dfb5039

Please sign in to comment.