-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(misc/loop): Setup the portal loop infra
- Loading branch information
Showing
10 changed files
with
308 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# The portal loop :infinity: | ||
|
||
## What is it ? | ||
|
||
It's a Gnoland node that aim to run with always the latest version of gno and never loose transactions history. | ||
|
||
For more information, see issue on github [gnolang/gno#1239](https://github.com/gnolang/gno/issues/1239) | ||
|
||
|
||
## How to use | ||
|
||
Start the loop with: | ||
|
||
``` sh | ||
$ docker compose up -d | ||
``` | ||
|
||
The `snapshotter` container will exec the script [switch.sh](./scripts/switch.sh) every day at 10am (defined in the docker image). | ||
|
||
This script is doing: | ||
|
||
- Pull the new docker image [ghcr.io/gnolang/gno] | ||
- Backup the txs using [gnolang/tx-archive](https://github.com/gnolang/tx-archive) | ||
- Start a new docker container with the backups files | ||
- Changing the proxy (traefik) to redirect to the new portal loop | ||
- Stop the previous loop |
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,12 @@ | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"4DBMw+h6VWyG+mQGZRnFjgOvc0F2R0QVmS4xHFkoAgkQZA5urLAZbv6mDuWGrNhkZIFmlBfPwgL62G2v4v7TZA=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"rmcT3Pi1pCP4caamMJPnQdKM4rDzkWDaiGsgVsmleAY+QNAr6O4kbvi/zmi1GtrXvG3Mkc43ryNdibKKyCfdlw=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"Kf/cBreBmTThcIf0sO5m2pfOfX13uus34Krmz9fV2PEDO7EyoWtaj212y3VI6IxkXrAEH4C4QRF4Snpfym9afw=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"pKUQqoFZk6yI4d8uJ2c3KN/Uiq1UMaLyaD0T7um0RZ1idzWPhfMrOY/137smB+aa2WlHAP61QOf3maCS7BohMg=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"ITL67CvMMGLUYfQk4FQZSX8s1F+e0ldvtn91HcsDaTR1alzBWeMJ8j8yG5XabjPZyqb89P7HA8Bcf6TSJ3/AnQ=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"TH0qoKSHhi0hu50R03tEOvV4Wh4J14cmjAsjSwDnk/EtAwINKyl14rBztdtwlawMreIss67tiHf4GBXknEGP8g=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"xZPqS0WKfsCSi9VLjNVXFYLIAK0ZBpORkhoxPCEMAYgkUBY6HeTTUnsPffUHF3GEPQZnEvp0XiGGuOZ5H59HFg=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"tykpijNkJhWNoS8KdA/v6dAHpSGOZn23RTvfF9q2PpIpcvre2SfW8sFlSvq9tcDyHH7xlgQavHCcjRfjzoqffg=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"f4sxA0IsF6YTM5pb5cDUrg1NFnoWmwAAGqLHcKGxPURvSMLXRB9AzpeZHX5V90Nzx8/k6ITQhG2o/fpU1CrPBw=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"cVGkrpP5H4s+vOlYzGYFHX1HccRPI2y3qfBLrD0qpoN2DDbHl0XNLuvTWccF5RiDIhC4i5XYBR7JN2eNjSP7GA=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_addpkg","creator":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","package":{"Name":"me","Path":"gno.land/r/albttx/me","Files":[{"Name":"me.gno","Body":"package me\n\nfunc Render(path string) string {\n\treturn `\n# Albttx\n\nHello, i'm @albttx, a Gnopher :v:\n`\n}\n"}]},"deposit":""}],"fee":{"gas_wanted":"800000","gas_fee":"10000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"gvk4xCoHphdaWmnXkKdVcB/fiWhon0bk2Iw0+45HLFBwA7JhNWE+qatU9TCqOGo20Tzvx/Fyqqv/p5A5LBXQZA=="}],"memo":""} | ||
{"msg":[{"@type":"/vm.m_call","caller":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","send":"","pkg_path":"gno.land/r/albttx/me","func":"Render","args":[""]}],"fee":{"gas_wanted":"2000000","gas_fee":"1000000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"GExT5gt6q4/ZBUq4ixkFJiFJBus9sEhP1VtGLoqGLjNdDo5g6iCW4Wzeu/9JhBdUvkFcl68C40cDc7N6Ae/Izw=="}],"memo":""} |
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,33 @@ | ||
version: "3" | ||
services: | ||
traefik: | ||
image: "traefik:v2.10" | ||
network_mode: host | ||
container_name: "traefik" | ||
command: | ||
- "--api.insecure=true" | ||
- "--providers.file=true" | ||
- "--providers.file.watch=true" | ||
- "--providers.file.directory=/etc/traefik/configs" | ||
- "--entrypoints.web.address=:80" | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
volumes: | ||
- ./traefik:/etc/traefik/configs | ||
|
||
snapshotter: | ||
build: | ||
dockerfile: ./snapshotter/Dockerfile | ||
command: ["/usr/sbin/crond", "-l", "2", "-f"] | ||
working_dir: /app | ||
network_mode: host | ||
volumes: | ||
- ./scripts:/scripts | ||
- ./backups:/backups | ||
- ./traefik:/etc/traefik/configs | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
environment: | ||
HOST_PWD: $PWD | ||
extra_hosts: | ||
- gno.land:127.0.0.1 |
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.