Skip to content

Commit

Permalink
feat: test3 (#385)
Browse files Browse the repository at this point in the history
* feat: test3

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>

* chore: update home for test3 and local devnet

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>

* chore: update home

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
  • Loading branch information
moul committed Nov 3, 2022
1 parent f21a1b9 commit 1ca2d97
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 13 deletions.
34 changes: 21 additions & 13 deletions gnoland/website/HOME.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
Welcome to Gno.land.
Welcome to Gno.land devnet.

* [Install `gnokey`](https://github.com/gnolang/gno/)
* [Acquire testnet tokens](/faucet)
* [Read the quickstart guide](/r/boards:gnolang/4)

Explore new packages.

* [/p/avl](/p/avl)
* [/r/boards](/r/boards)
* [/r/nft](/r/nft)
* [/r/users](/r/users)
* [/r/banktest](/r/banktest)
* [/p/grc/grc20](/p/grc/grc20)
* [/p/grc/grc721](/p/grc/grc721)
* [/r/foo20](/r/foo20)
* [/p/demo/avl](/p/demo/avl)
* [/p/demo/blog](/p/demo/blog)
* [/p/demo/flow](/p/demo/flow)
* [/p/demo/gnode](/p/demo/gnode)
* [/p/demo/grc/exts](/p/demo/grc/exts)
* [/p/demo/grc/grc20](/p/demo/grc/grc20)
* [/p/demo/grc/grc721](/p/demo/grc/grc721)
* [/r/demo/banktest](/r/demo/banktest)
* [/r/demo/boards](/r/demo/boards)
* [/r/demo/foo20](/r/demo/foo20)
* [/r/demo/nft](/r/demo/nft)
* [/r/demo/types](/r/demo/types)
* [/r/demo/users](/r/demo/users)
* [/r/gnoland/blog](/r/gnoland/blog)
* [/r/gnoland/faucet](/r/gnoland/faucet)
* [/r/system/names](/r/system/names)
* [/r/system/rewards](/r/system/rewards)
* [/r/system/validators](/r/system/validators)

This is a testnet. \
Package names are not guaranteed to be available for production.\
To be guaranteed a package and realm name, [register](/r/users).
This is a testnet.
Package names are not guaranteed to be available for production.

Also, join our [Discord](https://discord.gg/tF2X8M6cVj).
4 changes: 4 additions & 0 deletions misc/test3.gno.land/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RECAPTCHA_SITE_KEY=foobar
RECAPTCHA_SECRET_KEY=foobar
FAUCET_WORDS=foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz
GNOKEY_PASS=dontcare
3 changes: 3 additions & 0 deletions misc/test3.gno.land/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
data/
overlay/balances.txt
33 changes: 33 additions & 0 deletions misc/test3.gno.land/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
all: build up logs

up: ./overlay/balances.txt
mkdir -p data/gnoland/config
cp overlay/config.toml data/gnoland/config/config.toml
docker compose up --build -d

logs:
docker compose logs --tail=1000 -f

down:
docker compose down
docker volume rm -f test3gnoland_gnonode
docker compose run gnoland rm -rf /opt/gno/src/testdir/data /opt/gno/src/testdir/config

pull:
git pull

build:
docker compose build

./overlay/balances.txt:
wget https://github.com/gnolang/independence-day/raw/main/mkgenesis/balances.txt.gz -O overlay/balances.txt.gz
gunzip overlay/balances.txt.gz

gnotxport:
#docker build -t gno ../..
docker run -v "$(PWD):$(PWD)" -w "$(PWD)" gno gnotxport export --remote test3.gno.land:36657
tail -n 1 txexport.log
wc -l txexport.log

gnotximport:
docker run -v "$(PWD):$(PWD)" -w "$(PWD)" gno gnotxport import --remote test3.gno.land:36657
3 changes: 3 additions & 0 deletions misc/test3.gno.land/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# test3.gno.land

second official testnet.
140 changes: 140 additions & 0 deletions misc/test3.gno.land/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
version: "2"

services:
gnoland:
container_name: gnoland
build: ../..
environment:
- LOG_LEVEL=4
- VIRTUAL_HOST=rpc.test3.gno.land
- VIRTUAL_PORT=36657
- LETSENCRYPT_HOST=rpc.test3.gno.land
command:
- gnoland
- --skip-failing-genesis-txs
- --chainid
- test3
- --genesis-remote
- test3.gno.land:36657
- --genesis-balances-file
- /overlay/balances.txt
volumes:
- "./data/gnoland:/opt/gno/src/testdir"
- "./overlay:/overlay:ro"
ports:
- 36656:36656
- 36657:36657
restart: on-failure
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"

gnoweb:
container_name: gnoweb
build: ../..
command:
- gnoweb
- --bind
- 0.0.0.0:80
- --remote
- gnoland:36657
- --captcha-site
- $RECAPTCHA_SITE_KEY
- --faucet-url
- https://faucet.test3.gno.land/
- --help-chainid
- test3
- --help-remote
- test3.gno.land:36657
- --home-content
- /overlay/HOME.md
volumes:
- "./overlay:/overlay:ro"
links:
- gnoland
environment:
- VIRTUAL_HOST=test3.gno.land
- LETSENCRYPT_HOST=test3.gno.land
# from .env
- RECAPTCHA_SITE_KEY
restart: on-failure
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"

gnofaucet:
container_name: gnofaucet
build: ../..
command: sh -xc "
date &&
mkdir -p /.gno &&
expect -c \"set timeout -1; spawn gnokey add faucet --home /.gno/ --recover; expect \\\"Enter a passphrase\\\"; send \\\"$GNOKEY_PASS\\r\\\"; expect \\\"Repeat the passphrase\\\"; send \\\"$GNOKEY_PASS\\r\\\"; expect \\\"Enter your bip39 mnemonic\\\"; send \\\"$FAUCET_WORDS\\r\\\"; expect eof\" &&
while true; do
expect -c \"set timeout -1; spawn gnofaucet serve faucet --is-behind-proxy --send 50000000ugnot --captcha-secret \\\"$RECAPTCHA_SECRET_KEY\\\" --remote gnoland:36657 --chain-id test3 --home /.gno/; expect \\\"Enter password.\\\"; send \\\"$GNOKEY_PASS\\r\\\"; expect eof\";
sleep 5;
done
"
links:
- gnoland
environment:
- VIRTUAL_HOST=faucet.test3.gno.land
- VIRTUAL_PORT=5050
- LETSENCRYPT_HOST=faucet.test3.gno.land
# from .env
- RECAPTCHA_SECRET_KEY
- FAUCET_WORDS
- GNOKEY_PASS
ports:
- 5050
restart: on-failure
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"

nginx-proxy:
image: nginxproxy/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"

acme-companion:
image: nginxproxy/acme-companion
container_name: nginx-proxy-acme
environment:
- DEFAULT_EMAIL=noreply@gno.land
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"

volumes:
conf:
vhost:
html:
certs:
acme:
30 changes: 30 additions & 0 deletions misc/test3.gno.land/overlay/HOME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Welcome to test3.gno.land.

* [Install `gnokey`](https://github.com/gnolang/gno/)
* [Acquire testnet tokens](/faucet)

Explore new packages.

* [/r/gnoland/blog](/r/gnoland/blog)
* [/r/gnoland/faucet](/r/gnoland/faucet)
* [/r/system/names](/r/system/names)
* [/r/system/rewards](/r/system/rewards)
* [/r/system/validators](/r/system/validators)
* [/p/demo/avl](/p/demo/avl)
* [/p/demo/blog](/p/demo/blog)
* [/p/demo/flow](/p/demo/flow)
* [/p/demo/gnode](/p/demo/gnode)
* [/p/demo/grc/exts](/p/demo/grc/exts)
* [/p/demo/grc/grc20](/p/demo/grc/grc20)
* [/p/demo/grc/grc721](/p/demo/grc/grc721)
* [/r/demo/banktest](/r/demo/banktest)
* [/r/demo/boards](/r/demo/boards)
* [/r/demo/foo20](/r/demo/foo20)
* [/r/demo/nft](/r/demo/nft)
* [/r/demo/types](/r/demo/types)
* [/r/demo/users](/r/demo/users)

This is a testnet.
Package names are not guaranteed to be available for production.

Also, join our [Discord](https://discord.gg/tF2X8M6cVj).

0 comments on commit 1ca2d97

Please sign in to comment.