diff --git a/README.md b/README.md index 44f70c8..af308c7 100644 --- a/README.md +++ b/README.md @@ -117,3 +117,7 @@ To configure your chain, we use environment variables. * RPC_PASSWORD: 79pgKQusiH3VDVpyzsM6e3kRz6gWNctAwgJvymG3iiuz * RPC_ALLOW_IP: 0.0.0.0/0.0.0.0 * MASTERNODE: masternode # IP address of the master node, or a docker compose link. Don't forget the links section! + +### Multichain Web Demo + +[Multichain Web Demo](https://github.com/MultiChain/multichain-web-demo) is installed on the Masternode and is available at [http://localhost:8080/multichain-web-demo](http://localhost:8080/multichain-web-demo) diff --git a/docker-compose.yml b/docker-compose.yml index 1fefc5b..d2bd3ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: expose: - 7557 - 8002 + ports: + - 8080:80 environment: CHAINNAME: MyChain NETWORK_PORT: 7557 @@ -49,6 +51,8 @@ services: - 2750 - 7557 - 8002 + ports: + - 2750:2750 environment: CHAINNAME: MyChain NETWORK_PORT: 7557 diff --git a/master/Dockerfile b/master/Dockerfile index 8a2412b..c97d6a4 100644 --- a/master/Dockerfile +++ b/master/Dockerfile @@ -1,6 +1,13 @@ FROM kunstmaan/base-multichain MAINTAINER Kunstmaan +RUN apt-get update \ + && apt-get install -q -y git apache2 php \ + && service apache2 start \ + && apt-get install -y php-bcmath php-bz2 php-intl php-gd php-mbstring php-mcrypt php-zip php-curl \ + && apt-get install -y libapache2-mod-php \ + && cd /var/www/html && git clone https://github.com/MultiChain/multichain-web-demo.git + COPY ./runchain.sh /root/runchain.sh COPY ./blocknotify.sh /root/blocknotify.sh RUN chmod a+x /root/runchain.sh diff --git a/master/runchain.sh b/master/runchain.sh index c55d943..8521727 100644 --- a/master/runchain.sh +++ b/master/runchain.sh @@ -66,4 +66,14 @@ fi cp /root/.multichain/$CHAINNAME/multichain.conf /root/.multichain/multichain.conf +cat << EOF > /var/www/html/multichain-web-demo/config.txt +default.name=$CHAINNAME +default.rpchost=127.0.0.1 +default.rpcport=$RPC_PORT +default.rpcuser=$RPC_USER +default.rpcpassword=$RPC_PASSWORD +EOF + +service apache2 start + multichaind -txindex -shrinkdebugfilesize -printtoconsole $CHAINNAME