diff --git a/docker/testnet/Dockerfile b/docker/testnet/Dockerfile new file mode 100644 index 0000000..253f9cf --- /dev/null +++ b/docker/testnet/Dockerfile @@ -0,0 +1,26 @@ +FROM christroutner/ct-base-ubuntu +MAINTAINER Chris Troutner + +RUN apt-get update -y + +#Set the working directory to be the home directory +WORKDIR /home/safeuser + +# Switch to user account. +USER safeuser +# Prep 'sudo' commands. +#RUN echo 'abcd8765' | sudo -S pwd + +# Clone the repository +WORKDIR /home/safeuser +RUN git clone https://github.com/christroutner/bch-api +WORKDIR /home/safeuser/bch-api +RUN npm install + +# Generate documentation +RUN npm run docs + +EXPOSE 3000 + +COPY start-local-testnet.sh start-local-testnet.sh +CMD ["./start-local-testnet.sh"] diff --git a/docker/testnet/docker-compose.yml b/docker/testnet/docker-compose.yml new file mode 100644 index 0000000..edc28ee --- /dev/null +++ b/docker/testnet/docker-compose.yml @@ -0,0 +1,10 @@ +bch-api: + build: . + dockerfile: Dockerfile + #image: bitcore + container_name: bch-api + #links: + # - mongodb + ports: + - "13400:3000" + restart: always diff --git a/docker/testnet/start-local-testnet.sh b/docker/testnet/start-local-testnet.sh new file mode 100755 index 0000000..71a4741 --- /dev/null +++ b/docker/testnet/start-local-testnet.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Harddrive Mainnet full node +export RPC_BASEURL=http://172.17.0.1:18332/ +export RPC_USERNAME=bitcoin +export RPC_PASSWORD=password +export ZEROMQ_PORT=38332 +export ZEROMQ_URL=172.17.0.1 +export NETWORK=testnet + +# Team DO QA Testnet Insight Server +export BITCOINCOM_BASEURL=http://172.17.0.1:13100/api/ + +# Testnet SLPDB +#export SLPDB_URL=https://slpdb.bchdata.cash/ +export SLPDB_URL=http://172.17.0.1:13300/ + +# Testnet Bitcore Node API +export BITCORE_URL=http://172.17.0.1:13200/ + +# Testnet Blockbook +export BLOCKBOOK_URL=https://172.17.0.1:19131/ +# Allow node.js to make network calls to https using self-signed certificate. +export NODE_TLS_REJECT_UNAUTHORIZED=0 + +npm start