Skip to content

Commit 3337043

Browse files
committed
add docker-compose , localnode setup working 100% | hurray
1 parent a9a5a7a commit 3337043

101 files changed

Lines changed: 363 additions & 6260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

db.sqlite3

0 Bytes
Binary file not shown.

docker/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Build linux binary on other platforms
2+
build-linux:
3+
GOOS=linux GOARCH=amd64 $(MAKE) build
4+
5+
build-docker-localnode:
6+
cd networks/local
7+
make
8+
cd -
9+
10+
# Run a 4-node testnet locally
11+
localnet-start: localnet-stop
12+
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/tendermint:Z tendermint/localnode testnet --v 4 --o . --populate-persistent-peers --starting-ip-address 192.167.10.2 ; fi
13+
docker-compose up
14+
15+
# Stop testnet
16+
localnet-stop:
17+
docker-compose down

docker/Readme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# To run locally
2+
3+
1. Build tendermint localnode in the tendermint go path.
4+
5+
` cd $GOPATH/src/github.com/tendermint/tendermint/ `
6+
7+
2. Build the linux
8+
9+
` make build-linux`
10+
11+
3. Optionally run
12+
13+
`make build-docker-localnode`
14+
15+
also build the abci.Dockerfile to abcinode, if not it will throw error
16+
17+
4. Start the nodes
18+
19+
`make localnode-start`
20+
21+
to stop run `make localnode-stop`

docker/abci.Dockerfile

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,32 @@ RUN git clone https://github.com/gauthamzz/vimana
2424
RUN cd vimana && \
2525
pip3 install -r req.txt
2626
# RUN git clone https://github.com/davebryson/py-abci
27-
EXPOSE 8000 26658
27+
# EXPOSE
2828

2929
# RUN pip3 install abci
3030
# RUN -d python3 py-abci/examples/counter.py
3131
# CMD ["python3", "py-abci/examples/counter.py"]
3232

33-
RUN apt-get install -y unzip && apt-get install -y wget && wget https://github.com/tendermint/tendermint/releases/download/v0.27.3/tendermint_0.27.3_linux_amd64.zip
34-
RUN unzip tendermint_0.27.3_linux_amd64.zip && rm tendermint_0.27.3_linux_amd64.zip && mv tendermint /usr/local/bin
33+
# RUN apt-get install -y unzip && apt-get install -y wget && wget https://github.com/tendermint/tendermint/releases/download/v0.27.3/tendermint_0.27.3_linux_amd64.zip
34+
# RUN unzip tendermint_0.27.3_linux_amd64.zip && rm tendermint_0.27.3_linux_amd64.zip && mv tendermint /usr/local/bin
3535

36-
RUN tendermint init
36+
# RUN tendermint init
3737

38-
EXPOSE 26656 26657
38+
EXPOSE 26656 26657 8000 26658
3939

40-
CMD ["python3", "vimana/tendermint/app.py"]
41-
# docker run -d -p 0.0.0.0:26656-26657:26656-26657 w tendermint node
40+
# VOLUME [ /tendermint ]
41+
# WORKDIR /tendermint
42+
43+
# CMD ["python3", "~/vimana/tendermint/app.py"]
44+
# docker run -d -p 0.0.0.0:26656-26657:26656-26657 w tendermint node --consensus.create_empty_blocks=false
4245
# docker exec -it agitated_swartz /bin/bash
4346
# cd vimana/tendermint
44-
# python app.py
47+
# python app.py
48+
49+
50+
51+
# docker build -t abci1 -f abci.Dockerfile .
52+
# docker run -it -p 0.0.0.0:26665:26658 abci1 python3 vimana/tendermint/app.py
53+
54+
55+
# tendermint node --proxy_app=tcp://localhost:26658 --home "./tendermint/node0" --consensus.create_empty_blocks=false

0 commit comments

Comments
 (0)