Last active
August 29, 2015 14:23
-
-
Save compleatang/fe7711ada37e0cfd16c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# start the background containers | |
docker build -t 2gather . | |
docker run -d --name=compilers eris/compilers:latest | |
docker run -d -p 4001:4001 -p 8080:8080 --name=ipfs eris/ipfs:latest | |
docker run -d -e MASTER=true -e SERVE_GBLOCK=true -e FETCH_PORT=15256 \ | |
--name=helloworldmaster --expose=15254 --expose=15256 eris/erisdb:latest | |
sleep 5 # give the master a bit of time to get everything sorted | |
# start the writer | |
docker run -d -p 3000:3000 -e CONTAINERS=true --expose=15254 --expose=3000 \ | |
--link=compilers:compilers --link=ipfs:ipfs --link=helloworldmaster:helloworldmaster \ | |
--name=helloworldwrite 2gather | |
sleep 30 # give the writer time to catch up with master and deploy contracts | |
# grab the root contract from the writer | |
export ROOT_CONTRACT=$(docker logs helloworldwrite | grep ROOT_CONTRACT | tail -n 1 | cut -c 16-57) | |
# helpful for debugging | |
echo "" | |
echo "" | |
echo "Hello World Writer's DOUG Contract is at:" | |
echo $ROOT_CONTRACT | |
echo "" | |
# start the reader | |
docker run -d -p 3001:3000 -e CONTAINERS=true --expose=15254 --expose=3000 \ | |
--link=compilers:compilers --link=ipfs:ipfs --link=helloworldmaster:helloworldmaster \ | |
-e ROOT_CONTRACT=$ROOT_CONTRACT --link=helloworldwrite:helloworldwrite --name=helloworldread 2gather | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment