1
0

Update mempool fragment

This commit is contained in:
Dennis Reimann
2022-09-10 13:30:15 +02:00
parent 110c1caa01
commit b3701ebad3
2 changed files with 36 additions and 28 deletions

View File

@@ -209,33 +209,39 @@
} }
{{ end }} {{ end }}
{{ if (eq $serviceName "mempool_web") }} {{ if (eq $serviceName "mempool_web") }}
# https://github.com/mempool/mempool/tree/master/production/nginx
location /mempool/ { location /mempool/ {
proxy_pass http://mempool_web:8080; proxy_pass http://mempool_web:8080;
sub_filter_types *;
sub_filter_once off;
sub_filter 'base href="/' 'base href="/mempool/';
sub_filter '="/resources' '="/mempool/resources';
# static API docs # static API docs
location = /api { location = /mempool/api {
try_files $uri $uri/ /en-US/index.html =404; try_files $uri $uri/ /en-US/index.html =404;
} }
location = /api/ { location = /mempool/api/ {
try_files $uri $uri/ /en-US/index.html =404; try_files $uri $uri/ /en-US/index.html =404;
} }
# mainnet API # mainnet API
location /api/v1/ws { location /mempool/api/v1/ws {
proxy_pass http://mempool_api:8999/; proxy_pass http://mempool_api:8999/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";
} }
location /api/v1 { location /mempool/api/v1 {
proxy_pass http://mempool_api:8999/api/v1; proxy_pass http://mempool_api:8999/api/v1;
} }
location /api/ { location /mempool/api/ {
proxy_pass http://mempool_api:8999/api/v1/; proxy_pass http://mempool_api:8999/api/v1/;
} }
# mainnet API # mainnet API
location /ws { location /mempool/ws {
proxy_pass http://mempool_api:8999/; proxy_pass http://mempool_api:8999/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;

View File

@@ -1,10 +1,14 @@
version: '3' version: '3'
# reference: https://github.com/mempool/mempool/blob/master/docker/docker-compose.yml
services: services:
bitcoind: bitcoind:
environment: environment:
BITCOIN_EXTRA_ARGS: | BITCOIN_EXTRA_ARGS: |
rpcauth=mempool:d77ee0acf132038f6aaa9d4500d745ec$72cc78dcf18191c91d10c15ff8f7c3dbbd170c4d3107cca35d71c6bf96af2ed9 # We need to use rpcauth because we also need cookieauth. rpcpassword disabled cookie file auth.
# Be careful if you copy the line below from the docker-compose.yml! A dollar sign is escaped.
rpcauth=mempool:d77ee0acf132038f6aaa9d4500d745ec$$72cc78dcf18191c91d10c15ff8f7c3dbbd170c4d3107cca35d71c6bf96af2ed9
mempool_web: mempool_web:
image: mempool/frontend:latest image: mempool/frontend:latest
restart: on-failure restart: on-failure
@@ -20,25 +24,23 @@ services:
image: mempool/backend:latest image: mempool/backend:latest
restart: on-failure restart: on-failure
stop_grace_period: 1m stop_grace_period: 1m
command: "./wait-for-it.sh db:3306 --timeout=720 --strict -- ./start.sh" command: "./wait-for-it.sh mempool_db:3306 --timeout=720 --strict -- ./start.sh"
volumes: volumes:
- mempool_api_datadir:/backend/cache - mempool_api_datadir:/backend/cache
environment: environment:
RPC_HOST: "bitcoind" MEMPOOL_BACKEND: "electrum"
RPC_PORT: "43782"
RPC_USER: "mempool"
RPC_PASS: "mempool"
ELECTRUM_HOST: "electrumx" ELECTRUM_HOST: "electrumx"
ELECTRUM_PORT: "50002" ELECTRUM_PORT: "50002"
ELECTRUM_TLS: "false" ELECTRUM_TLS_ENABLED: "false"
MYSQL_HOST: "mempool_db" CORE_RPC_HOST: "bitcoind"
MYSQL_PORT: "3306" CORE_RPC_PORT: "43782"
MYSQL_DATABASE: "mempool" CORE_RPC_USERNAME: "mempool"
MYSQL_USER: "mempool" CORE_RPC_PASSWORD: "mempool"
MYSQL_PASS: "mempool" DATABASE_ENABLED: "true"
BACKEND_MAINNET_HTTP_PORT: "8999" DATABASE_HOST: "mempool_db"
CACHE_DIR: "/backend/cache" DATABASE_DATABASE: "mempool"
MEMPOOL_CLEAR_PROTECTION_MINUTES: "20" DATABASE_USERNAME: "mempool"
DATABASE_PASSWORD: "mempool"
mempool_db: mempool_db:
image: mariadb:10.5.8 image: mariadb:10.5.8
@@ -47,7 +49,6 @@ services:
- "3306" - "3306"
volumes: volumes:
- "mempool_db_datadir:/var/lib/mysql" - "mempool_db_datadir:/var/lib/mysql"
- ./mysql/db-scripts:/docker-entrypoint-initdb.d
environment: environment:
MYSQL_DATABASE: "mempool" MYSQL_DATABASE: "mempool"
MYSQL_USER: "mempool" MYSQL_USER: "mempool"
@@ -56,13 +57,14 @@ services:
btcpayserver: btcpayserver:
environment: environment:
BTCPAY_EXTERNALSERVICES: "Mempool Explorer:/mempool-explorer" BTCPAY_EXTERNALSERVICES: "Mempool Explorer:/mempool"
volumes: volumes:
- mempool_db_datadir: mempool_db_datadir:
- mempool_api_datadir: mempool_api_datadir:
required: required:
- opt-add-electrumx - "opt-add-electrumx"
- opt-txindex
incompatible: incompatible:
- pruning - pruning