2021-02-01 17:25:08 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-02-02 17:54:01 +01:00
|
|
|
#MEMPOOL
|
|
|
|
__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__=${BACKEND_MAINNET_HTTP_PORT:=8999}
|
2021-02-25 10:33:04 +01:00
|
|
|
__MEMPOOL_BACKEND_MAINNET_CACHE_DIR__=${CACHE_DIR:=./cache}
|
|
|
|
__MEMPOOL_BACKEND_CLEAR_PROTECTION_MINUTES__=${MEMPOOL_CLEAR_PROTECTION_MINUTES:=20}
|
2021-02-02 17:54:01 +01:00
|
|
|
# BITCOIN
|
|
|
|
__BITCOIN_MAINNET_RPC_HOST__=${RPC_HOST:=127.0.0.1}
|
|
|
|
__BITCOIN_MAINNET_RPC_PORT__=${RPC_PORT:=8332}
|
|
|
|
__BITCOIN_MAINNET_RPC_USER__=${RPC_USER:=mempool}
|
|
|
|
__BITCOIN_MAINNET_RPC_PASS__=${RPC_PASS:=mempool}
|
|
|
|
# ELECTRUM
|
2021-02-26 09:04:14 +01:00
|
|
|
__ELECTRUM_MAINNET_HTTP_HOST__=${ELECTRUM_HOST:=127.0.0.1}
|
|
|
|
__ELECTRUM_MAINNET_HTTP_PORT__=${ELECTRUM_PORT:=50002}
|
|
|
|
__ELECTRUM_MAINNET_TLS_ENABLED__=${ELECTRUM_TLS:=false}
|
2021-02-02 17:54:01 +01:00
|
|
|
# MYSQL
|
|
|
|
__MYSQL_HOST__=${MYSQL_HOST:=127.0.0.1}
|
|
|
|
__MYSQL_PORT__=${MYSQL_PORT:=3306}
|
2021-02-10 14:51:01 +01:00
|
|
|
__MYSQL_DATABASE__=${MYSQL_DATABASE:=mempool}
|
|
|
|
__MYSQL_USERNAME__=${MYSQL_USER:=mempool}
|
|
|
|
__MYSQL_PASSWORD__=${MYSQL_PASS:=mempool}
|
2021-02-02 17:54:01 +01:00
|
|
|
|
2021-02-02 23:45:54 +01:00
|
|
|
mkdir -p "${__MEMPOOL_BACKEND_MAINNET_CACHE_DIR__}"
|
2021-02-01 17:25:08 +01:00
|
|
|
|
2021-02-02 16:34:21 +01:00
|
|
|
sed -i "s/__BITCOIN_MAINNET_RPC_HOST__/${__BITCOIN_MAINNET_RPC_HOST__}/g" mempool-config.json
|
|
|
|
sed -i "s/__BITCOIN_MAINNET_RPC_PORT__/${__BITCOIN_MAINNET_RPC_PORT__}/g" mempool-config.json
|
|
|
|
sed -i "s/__BITCOIN_MAINNET_RPC_USER__/${__BITCOIN_MAINNET_RPC_USER__}/g" mempool-config.json
|
|
|
|
sed -i "s/__BITCOIN_MAINNET_RPC_PASS__/${__BITCOIN_MAINNET_RPC_PASS__}/g" mempool-config.json
|
2021-02-26 09:04:14 +01:00
|
|
|
sed -i "s/__ELECTRUM_MAINNET_HTTP_HOST__/${__ELECTRUM_MAINNET_HTTP_HOST__}/g" mempool-config.json
|
|
|
|
sed -i "s/__ELECTRUM_MAINNET_HTTP_PORT__/${__ELECTRUM_MAINNET_HTTP_PORT__}/g" mempool-config.json
|
|
|
|
sed -i "s/__ELECTRUM_MAINNET_TLS_ENABLED__/${__ELECTRUM_MAINNET_TLS_ENABLED__}/g" mempool-config.json
|
2021-02-02 16:34:21 +01:00
|
|
|
sed -i "s/__MYSQL_HOST__/${__MYSQL_HOST__}/g" mempool-config.json
|
|
|
|
sed -i "s/__MYSQL_PORT__/${__MYSQL_PORT__}/g" mempool-config.json
|
2021-02-10 14:51:01 +01:00
|
|
|
sed -i "s/__MYSQL_DATABASE__/${__MYSQL_DATABASE__}/g" mempool-config.json
|
|
|
|
sed -i "s/__MYSQL_USERNAME__/${__MYSQL_USERNAME__}/g" mempool-config.json
|
|
|
|
sed -i "s/__MYSQL_PASSWORD__/${__MYSQL_PASSWORD__}/g" mempool-config.json
|
2021-02-02 19:20:05 +01:00
|
|
|
sed -i "s!__MEMPOOL_BACKEND_MAINNET_CACHE_DIR__!${__MEMPOOL_BACKEND_MAINNET_CACHE_DIR__}!g" mempool-config.json
|
|
|
|
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/${__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__}/g" mempool-config.json
|
2021-02-25 10:33:04 +01:00
|
|
|
sed -i "s/__MEMPOOL_BACKEND_CLEAR_PROTECTION_MINUTES__/${__MEMPOOL_BACKEND_CLEAR_PROTECTION_MINUTES__}/g" mempool-config.json
|
2021-02-01 17:25:08 +01:00
|
|
|
|
|
|
|
node /backend/dist/index.js
|