mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Update ENV_VARIABLES in scripts && Fix some errors
This commit is contained in:
parent
6efe055003
commit
91d4017aa6
@ -5,15 +5,12 @@ COPY . .
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y build-essential python3 pkg-config
|
RUN apt-get install -y build-essential python3 pkg-config
|
||||||
RUN npm ci --production
|
RUN npm ci --production
|
||||||
RUN npm i typescript
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:12-buster-slim
|
FROM node:12-buster-slim
|
||||||
|
|
||||||
WORKDIR /backend
|
WORKDIR /backend
|
||||||
|
|
||||||
RUN mkdir cache
|
|
||||||
|
|
||||||
COPY --from=builder /build/ .
|
COPY --from=builder /build/ .
|
||||||
|
|
||||||
RUN chmod +x /backend/start.sh
|
RUN chmod +x /backend/start.sh
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
__BITCOIN_MAINNET_RPC_HOST__=${RPC_HOST}
|
#MEMPOOL
|
||||||
__BITCOIN_MAINNET_RPC_PORT__=${RPC_PORT}
|
__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__=${BACKEND_MAINNET_HTTP_PORT:=8999}
|
||||||
__BITCOIN_MAINNET_RPC_USER__=${RPC_USER}
|
__MEMPOOL_BACKEND_CACHE_DIR__=${CACHE_DIR:=/backend/cache}
|
||||||
__BITCOIN_MAINNET_RPC_PASS__=${RPC_PASS}
|
# BITCOIN
|
||||||
__ELECTRS_MAINNET_HTTP_HOST__=${ELECTRS_HOST}
|
__BITCOIN_MAINNET_RPC_HOST__=${RPC_HOST:=127.0.0.1}
|
||||||
__ELECTRS_MAINNET_HTTP_PORT__=${ELECTRS_PORT}
|
__BITCOIN_MAINNET_RPC_PORT__=${RPC_PORT:=8332}
|
||||||
__MYSQL_HOST__=${MYSQL_HOST}
|
__BITCOIN_MAINNET_RPC_USER__=${RPC_USER:=mempool}
|
||||||
__MYSQL_PORT__=${MYSQL_PORT}
|
__BITCOIN_MAINNET_RPC_PASS__=${RPC_PASS:=mempool}
|
||||||
__MEMPOOL_BACKEND_CACHE_DIR__=${CACHE_DIR}
|
# ELECTRUM
|
||||||
__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__=${BACKEND_MAINNET_HTTP_HOST}
|
__ELECTRS_MAINNET_HTTP_HOST__=${ELECTRS_HOST:=127.0.0.1}
|
||||||
__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__=${BACKEND_MAINNET_HTTP_PORT}
|
__ELECTRS_MAINNET_HTTP_PORT__=${ELECTRS_PORT:=50002}
|
||||||
|
# MYSQL
|
||||||
|
__MYSQL_HOST__=${MYSQL_HOST:=127.0.0.1}
|
||||||
|
__MYSQL_PORT__=${MYSQL_PORT:=3306}
|
||||||
|
|
||||||
|
mkdir __MEMPOOL_BACKEND_CACHE_DIR__
|
||||||
|
|
||||||
sed -i "s/__BITCOIN_MAINNET_RPC_HOST__/${__BITCOIN_MAINNET_RPC_HOST__}/g" mempool-config.json
|
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_PORT__/${__BITCOIN_MAINNET_RPC_PORT__}/g" mempool-config.json
|
||||||
@ -22,6 +27,5 @@ sed -i "s/__MYSQL_HOST__/${__MYSQL_HOST__}/g" mempool-config.json
|
|||||||
sed -i "s/__MYSQL_PORT__/${__MYSQL_PORT__}/g" mempool-config.json
|
sed -i "s/__MYSQL_PORT__/${__MYSQL_PORT__}/g" mempool-config.json
|
||||||
sed -i "s/__MEMPOOL_BACKEND_CACHE_DIR__/${__MEMPOOL_BACKEND_CACHE_DIR__}/g" mempool-config.json
|
sed -i "s/__MEMPOOL_BACKEND_CACHE_DIR__/${__MEMPOOL_BACKEND_CACHE_DIR__}/g" mempool-config.json
|
||||||
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/${__MEMPOOL_BACKEND_MAINNET_HTTP_PORT_}/g" mempool-config.json
|
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/${__MEMPOOL_BACKEND_MAINNET_HTTP_PORT_}/g" mempool-config.json
|
||||||
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__/${__MEMPOOL_BACKEND_MAINNET_HTTP_HOST_}/g" mempool-config.json
|
|
||||||
|
|
||||||
node /backend/dist/index.js
|
node /backend/dist/index.js
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__=${BACKEND_MAINNET_HTTP_HOST}
|
__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__=${BACKEND_MAINNET_HTTP_HOST:=127.0.0.1}
|
||||||
|
|
||||||
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__/${__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__}/g" /etc/nginx/conf.d/nginx-mempool.conf
|
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__/${__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__}/g" /etc/nginx/conf.d/nginx-mempool.conf
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ sed -i "s/${localhostIP}:/0.0.0.0:80/g" ./frontend/nginx.conf
|
|||||||
sed -i "s/${localhostIP}/0.0.0.0/g" ./frontend/nginx.conf
|
sed -i "s/${localhostIP}/0.0.0.0/g" ./frontend/nginx.conf
|
||||||
sed -i "s/user nobody;//g" ./frontend/nginx.conf
|
sed -i "s/user nobody;//g" ./frontend/nginx.conf
|
||||||
sed -i "s!/etc/nginx/nginx-mempool.conf!/etc/nginx/conf.d/nginx-mempool.conf!g" ./frontend/nginx.conf
|
sed -i "s!/etc/nginx/nginx-mempool.conf!/etc/nginx/conf.d/nginx-mempool.conf!g" ./frontend/nginx.conf
|
||||||
sed -i "s/${localhostIP}:/__MEMPOOL_MAINNET_BACKEND_HOST__:/g" ./frontend/nginx-mempool.conf
|
sed -i "s/${localhostIP}:/__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:/g" ./frontend/nginx-mempool.conf
|
||||||
|
|
||||||
#db
|
#db
|
||||||
cp -fr docker/mysql .
|
cp -fr docker/mysql .
|
||||||
|
Loading…
Reference in New Issue
Block a user