forked from Finschia/finschia-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Setup localnet * Fix compose * Fix file perms * Fix build * Codec + lint updates * lint++
- Loading branch information
1 parent
14e3aa1
commit 7871910
Showing
15 changed files
with
546 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
version: '3' | ||
|
||
services: | ||
simdnode0: | ||
container_name: simdnode0 | ||
image: "cosmos-sdk/simappnode" | ||
ports: | ||
- "26656-26657:26656-26657" | ||
environment: | ||
- ID=0 | ||
- LOG=${LOG:-simd.log} | ||
volumes: | ||
- ./build:/simd:Z | ||
networks: | ||
localnet: | ||
ipv4_address: 192.168.10.2 | ||
|
||
simdnode1: | ||
container_name: simdnode1 | ||
image: "cosmos-sdk/simappnode" | ||
ports: | ||
- "26659-26660:26656-26657" | ||
environment: | ||
- ID=1 | ||
- LOG=${LOG:-simd.log} | ||
volumes: | ||
- ./build:/simd:Z | ||
networks: | ||
localnet: | ||
ipv4_address: 192.168.10.3 | ||
|
||
simdnode2: | ||
container_name: simdnode2 | ||
image: "cosmos-sdk/simappnode" | ||
environment: | ||
- ID=2 | ||
- LOG=${LOG:-simd.log} | ||
ports: | ||
- "26661-26662:26656-26657" | ||
volumes: | ||
- ./build:/simd:Z | ||
networks: | ||
localnet: | ||
ipv4_address: 192.168.10.4 | ||
|
||
simdnode3: | ||
container_name: simdnode3 | ||
image: "cosmos-sdk/simappnode" | ||
environment: | ||
- ID=3 | ||
- LOG=${LOG:-simd.log} | ||
ports: | ||
- "26663-26664:26656-26657" | ||
volumes: | ||
- ./build:/simd:Z | ||
networks: | ||
localnet: | ||
ipv4_address: 192.168.10.5 | ||
|
||
networks: | ||
localnet: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- | ||
subnet: 192.168.10.0/16 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
all: | ||
docker build --tag cosmos-sdk/simappnode simappnode | ||
|
||
.PHONY: all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#FROM alpine:3.10.2 | ||
# | ||
#RUN apk update && \ | ||
# apk upgrade && \ | ||
# apk --no-cache add curl jq file | ||
|
||
# Changed from Alpine to Ubuntu because the keyring PR is linking to libc | ||
# Alpine uses muslc instead of libc | ||
|
||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y install curl jq file | ||
|
||
VOLUME [ /simd ] | ||
WORKDIR /simd | ||
EXPOSE 26656 26657 | ||
ENTRYPOINT ["/usr/bin/wrapper.sh"] | ||
CMD ["start"] | ||
STOPSIGNAL SIGTERM | ||
|
||
COPY wrapper.sh /usr/bin/wrapper.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env sh | ||
|
||
BINARY=/simd/${BINARY:-simd} | ||
ID=${ID:-0} | ||
LOG=${LOG:-simd.log} | ||
|
||
if ! [ -f "${BINARY}" ]; then | ||
echo "The binary $(basename "${BINARY}") cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'simd'" | ||
exit 1 | ||
fi | ||
|
||
BINARY_CHECK="$(file "$BINARY" | grep 'ELF 64-bit LSB executable, x86-64')" | ||
|
||
if [ -z "${BINARY_CHECK}" ]; then | ||
echo "Binary needs to be OS linux, ARCH amd64" | ||
exit 1 | ||
fi | ||
|
||
export SIMDHOME="/simd/node${ID}/simd" | ||
|
||
if [ -d "$(dirname "${SIMDHOME}"/"${LOG}")" ]; then | ||
"${BINARY}" --home "${SIMDHOME}" "$@" | tee "${SIMDHOME}/${LOG}" | ||
else | ||
"${BINARY}" --home "${SIMDHOME}" "$@" | ||
fi |
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
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
Oops, something went wrong.