Verified Commit 67788333 authored by likewhoa's avatar likewhoa
Browse files

Rename variables for mempool docker and make use

of them in yaml files
parent 4f843485
......@@ -20,9 +20,10 @@ DOJO_TOR_VERSION_TAG=1.10.0
DOJO_EXPLORER_VERSION_TAG=1.7.0
DOJO_INDEXER_VERSION_TAG=1.3.0
DOJO_WHIRLPOOL_VERSION_TAG=1.4.0
DOJO_MEMPOOL_API_VERSION_TAG=2.2.0
DOJO_MEMPOOL_WEB_VERSION_TAG=2.2.0
MEMPOOL_API_VERSION_TAG=2.2.0
MEMPOOL_WEB_VERSION_TAG=2.2.0
MEMPOOL_DB_VERSION_TAG=10.5.8
#########################################
# NETWORKING
......@@ -35,9 +36,6 @@ NET_DOJO_TOR_IPV4=172.28.1.4
NET_DOJO_BITCOIND_IPV4=172.28.1.5
NET_DOJO_INDEXER_IPV4=172.28.1.6
NET_DOJO_EXPLORER_IPV4=172.28.1.7
NET_DOJO_MEMPOOL_DB_IPV4=172.28.1.40
NET_DOJO_MEMPOOL_API_IPV4=172.28.1.41
NET_DOJO_MEMPOOL_WEB_IPV4=172.28.1.42
NET_DMZ_NGINX_IPV4=172.29.1.3
NET_DMZ_TOR_IPV4=172.29.1.4
......@@ -45,6 +43,9 @@ NET_DMZ_TOR_IPV4=172.29.1.4
NET_WHIRL_NGINX_IPV4=172.30.1.3
NET_WHIRL_WHIRLPOOL_IPV4=172.30.1.8
NET_MEMPOOL_DB_IPV4=172.28.1.40
NET_MEMPOOL_API_IPV4=172.28.1.41
NET_MEMPOOL_WEB_IPV4=172.28.1.42
#########################################
# MYSQL
......@@ -128,10 +129,10 @@ SOROBAN_LINUX_UID=1111
SOROBAN_LINUX_GID=1114
#########################################
# MEMPOOL
# MEMPOOL SPACE
#########################################
MEMPOOL_WEB_LINUX_UID=1121
MEMPOOL_WEB_LINUX_GID=1124
MEMPOOL_API_LINUX_UID=1122
MEMPOOL_API_LINUX_GID=1125
MEMPOOL_API_LINUX_GID=1125
\ No newline at end of file
......@@ -30,7 +30,7 @@ export BITCOIND_RPC_PORT
export BITCOIND_RPC_USER
export BITCOIND_RPC_PASSWORD
export INDEXER_RPC_PORT
export NET_DOJO_MEMPOOL_API_IPV4
export NET_MEMPOOL_API_IPV4
# Select YAML files
select_yaml_files() {
......@@ -283,6 +283,9 @@ clean() {
del_images_for samouraiwallet/dojo-tor "$DOJO_TOR_VERSION_TAG"
del_images_for samouraiwallet/dojo-indexer "$DOJO_INDEXER_VERSION_TAG"
del_images_for samouraiwallet/dojo-whirlpool "$DOJO_WHIRLPOOL_VERSION_TAG"
del_images_for mempool/backend "$MEMPOOL_API_VERSION_TAG"
del_images_for mempool/frontend "$MEMPOOL_WEB_VERSION_TAG"
del_images_for mariadb "$MEMPOOL_DB_VERSION_TAG"
docker image prune -f
}
......
......@@ -3,7 +3,7 @@ version: "3.7"
services:
mempool_api:
container_name: "mempool_api"
image: mempool/backend:v2.2.1
image: mempool/backend:v${MEMPOOL_API_VERSION_TAG}
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
......@@ -23,6 +23,7 @@ services:
ELECTRUM_TLS: "false"
MYSQL_HOST: "mempool_db"
MYSQL_PORT: "3306"
MYSQL_PASS: ${MYSQL_PASSWORD}
BACKEND_MAINNET_HTTP_PORT: "8999"
CACHE_DIR: "/backend/cache"
MEMPOOL_CLEAR_PROTECTION_MINUTES: "20"
......@@ -37,11 +38,11 @@ services:
- mempool_db
networks:
dojonet:
ipv4_address: ${NET_DOJO_MEMPOOL_API_IPV4}
ipv4_address: ${NET_MEMPOOL_API_IPV4}
mempool_web:
container_name: "mempool_web"
image: mempool/frontend:v2.2.1
image: mempool/frontend:v${MEMPOOL_WEB_VERSION_TAG}
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
......@@ -50,7 +51,7 @@ services:
- ./.env
environment:
FRONTEND_HTTP_PORT: "8080"
BACKEND_MAINNET_HTTP_HOST: ${NET_DOJO_MEMPOOL_API_IPV4}
BACKEND_MAINNET_HTTP_HOST: ${NET_MEMPOOL_API_IPV4}
logging:
driver: "json-file"
options:
......@@ -60,11 +61,11 @@ services:
- mempool_db
networks:
dojonet:
ipv4_address: ${NET_DOJO_MEMPOOL_WEB_IPV4}
ipv4_address: ${NET_MEMPOOL_WEB_IPV4}
mempool_db:
container_name: "mempool_db"
image: mariadb:10.5.8
image: mariadb:${MEMPOOL_DB_VERSION_TAG}
restart: on-failure
stop_grace_period: 1m
volumes:
......@@ -79,7 +80,7 @@ services:
max-file: "10"
networks:
dojonet:
ipv4_address: ${NET_DOJO_MEMPOOL_DB_IPV4}
ipv4_address: ${NET_MEMPOOL_DB_IPV4}
volumes:
data-mempool_api:
......
......@@ -44,7 +44,7 @@ fi
if [ "$MEMPOOL_INSTALL" == "on" ]; then
tor_options+=(--HiddenServiceDir /var/lib/tor/hsv3mempool)
tor_options+=(--HiddenServiceVersion 3)
tor_options+=(--HiddenServicePort "80 $NET_DOJO_MEMPOOL_WEB_IPV4:8080")
tor_options+=(--HiddenServicePort "80 $NET_MEMPOOL_WEB_IPV4:8080")
tor_options+=(--HiddenServiceDirGroupReadable 1)
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment