Skip to content

Commit

Permalink
chore: add gnoweb
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed Dec 5, 2023
1 parent 716d261 commit 45a0566
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
16 changes: 15 additions & 1 deletion misc/loop/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "3"
services:
traefik:
image: "traefik:v2.10"
restart: unless-stopped
network_mode: host
container_name: "traefik"
command:
Expand All @@ -16,10 +17,23 @@ services:
volumes:
- ./traefik:/etc/traefik/configs

gnoweb:
image: ghcr.io/gnolang/gno/gnoweb-slim
network_mode: host
restart: unless-stopped
entrypoint:
- gnoweb
- --bind=localhost:8888
- --remote=rpc.gno.land:80
- --views-dir=./gnoweb/views
extra_hosts:
- rpc.gno.land:127.0.0.1

snapshotter:
build:
dockerfile: ./snapshotter/Dockerfile
command: ["/usr/sbin/crond", "-l", "2", "-f"]
restart: unless-stopped
working_dir: /app
network_mode: host
volumes:
Expand All @@ -30,4 +44,4 @@ services:
environment:
HOST_PWD: $PWD
extra_hosts:
- gno.land:127.0.0.1
- rpc.gno.land:127.0.0.1
2 changes: 1 addition & 1 deletion misc/loop/scripts/switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker pull ghcr.io/gnolang/gno
if docker ps --format json | jq '.Labels' | grep -q "the-portal-loop"; then
${TX_ARCHIVE_CMD} backup \
--overwrite=true \
--remote "gno.land:80" \
--remote "rpc.gno.land:80" \
--from-block 1 \
--output-path="${BACKUP_FILE}"

Expand Down
4 changes: 2 additions & 2 deletions misc/loop/traefik/gno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ http:
gno-portal-loop:
service: gno-portal-loop
# tls: "true"
rule: "Host(`gno.land`)"
rule: "Host(`rpc.gno.land`)"
entrypoints: "web"
middlewares: []

services:
gno-portal-loop:
loadBalancer:
servers:
- url: "http://localhost:26657"
- url: "http://localhost:33015"
14 changes: 14 additions & 0 deletions misc/loop/traefik/gnoweb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
http:
routers:
gnoweb:
service: gnoweb
rule: "Host(`gno.land`)"
entrypoints: "web"
middlewares: []

services:
gnoweb:
loadBalancer:
servers:
- url: "http://localhost:8888"

0 comments on commit 45a0566

Please sign in to comment.