From 623c45877616cda00aefeed0dd26ebdd76c8c05f Mon Sep 17 00:00:00 2001 From: czarly <379651+czarly@users.noreply.github.com> Date: Wed, 16 Mar 2022 12:46:47 +0400 Subject: [PATCH] move pokt config inside the container --- pokt/DockerFile | 9 +++++++++ pokt/bootstrap.sh | 10 ++++++++++ pokt/chains.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 pokt/DockerFile create mode 100755 pokt/bootstrap.sh create mode 100644 pokt/chains.json diff --git a/pokt/DockerFile b/pokt/DockerFile new file mode 100644 index 00000000..22555c9a --- /dev/null +++ b/pokt/DockerFile @@ -0,0 +1,9 @@ +FROM poktnetwork/pocket-core:RC-0.7.1 + +COPY config.json /home/app/.pocket/config/config.json +COPY chains.json /home/app/.pocket/config/chains.json +COPY bootstrap.sh /home/app/.pocket/bootstrap.sh + +RUN chown 1005:1001 /home/app/.pocket/config/chains.json + +CMD ["bash", "/home/app/.pocket/bootstrap.sh", "&&", "pocket", "start", "--seeds=${POCKET_MAIN_SEEDS}", "--mainnet"] \ No newline at end of file diff --git a/pokt/bootstrap.sh b/pokt/bootstrap.sh new file mode 100755 index 00000000..f326d5fe --- /dev/null +++ b/pokt/bootstrap.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ ! -f /home/app/.pocket/setupdone ] +then + mkdir -p /home/app/.pocket/data + echo "wget -q -O - '$POCKET_SNAPSHOT' | tar -xv -C /home/app/.pocket/data/" + wget -q -O - $POCKET_SNAPSHOT | tar -xv -C /home/app/.pocket/data/ + touch /home/app/.pocket/setupdone +fi + diff --git a/pokt/chains.json b/pokt/chains.json new file mode 100644 index 00000000..97e7c1c4 --- /dev/null +++ b/pokt/chains.json @@ -0,0 +1,46 @@ +[ + { + "id": "0001", + "url": "https://${DOMAIN}/pokt" + }, + { + "id": "0004", + "url": "https://${DOMAIN}/bsc" + }, + { + "id": "0005", + "url": "https://${DOMAIN}/fuse" + }, + { + "id": "0021", + "url": "https://${DOMAIN}/erigon" + }, + { + "id": "0022", + "url": "https://${DOMAIN}/erigon" + }, + { + "id": "0023", + "url": "https://${DOMAIN}/ropsten" + }, + { + "id": "0025", + "url": "https://${DOMAIN}/rinkeby" + }, + { + "id": "0026", + "url": "https://${DOMAIN}/goerli" + }, + { + "id": "0027", + "url": "https://${DOMAIN}/xdai" + }, + { + "id": "0028", + "url": "https://${DOMAIN}/erigon" + }, + { + "id": "0040", + "url": "https://${DOMAIN}/harmony" + } +] \ No newline at end of file