diff --git a/docker/mainnet/Dockerfile b/docker/mainnet/Dockerfile new file mode 100644 index 0000000..13f0b7e --- /dev/null +++ b/docker/mainnet/Dockerfile @@ -0,0 +1,24 @@ +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 Bitcore repository +WORKDIR /home/safeuser +RUN git clone https://github.com/christroutner/bch-api +WORKDIR /home/safeuser/bch-api +RUN npm install + + +EXPOSE 3000 + +COPY start-local-mainnet start-local-mainnet +CMD ["./start-local-mainnet"] diff --git a/docker/mainnet/docker-compose.yml b/docker/mainnet/docker-compose.yml new file mode 100644 index 0000000..8f12490 --- /dev/null +++ b/docker/mainnet/docker-compose.yml @@ -0,0 +1,10 @@ +bch-api: + build: . + dockerfile: Dockerfile + #image: bitcore + container_name: bch-api-main + links: + - mongodb + ports: + - "12400:3000" + restart: always diff --git a/docker/mainnet/start-local-mainnet b/docker/mainnet/start-local-mainnet new file mode 100755 index 0000000..323e9ae --- /dev/null +++ b/docker/mainnet/start-local-mainnet @@ -0,0 +1,26 @@ +#!/bin/bash + +# Harddrive Mainnet full node +export RPC_BASEURL=http://172.17.0.1:8332/ +export RPC_USERNAME=bitcoin +export RPC_PASSWORD=password +export ZEROMQ_PORT=28332 +export ZEROMQ_URL=172.17.0.1 +export NETWORK=mainnet + +# Team DO QA Testnet Insight Server +export BITCOINCOM_BASEURL=http://172.17.0.1:12100/api/ + +# Testnet SLPDB +export SLPDB_URL=https://slpdb.bchdata.cash/ +#export SLPDB_URL=http://172.17.0.1:4000/ + +# Testnet Bitcore Node API +export BITCORE_URL=http://172.17.0.1:12200/ + +# Testnet Blockbook +export BLOCKBOOK_URL=https://172.17.0.1:9131/ +# Allow node.js to make network calls to https using self-signed certificate. +export NODE_TLS_REJECT_UNAUTHORIZED=0 + +npm start