Skip to content

Commit

Permalink
Feat add tzproxy (#344)
Browse files Browse the repository at this point in the history
* added tzproxy middleware
  • Loading branch information
Zir0h authored Oct 21, 2023
1 parent f3900ad commit 70777e9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ server {
}

location ^~ /rpc/ {
proxy_pass http://rpc_nodes/;
proxy_pass http://tzproxy:8080/;
}

location = /status {
Expand All @@ -166,6 +166,14 @@ server {
}
}
server {
listen 0.0.0.0:8000;
access_log off;
location / {
proxy_pass http://rpc_nodes/;
}
}
server {
listen 8080;
root /usr/local/openresty/nginx/html;
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/tzproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cache:
disabled_routes:
- /monitor/.*
enabled: true
size_mb: 128
ttl: 10
cors:
enabled: false
deny_list:
enabled: false
values: []
deny_routes:
enabled: true
values:
- /injection/block
- /injection/protocol
- /network.*
- /workers.*
- /worker.*
- /stats.*
- /config
- /chains/main/blocks/.*/helpers/baking_rights
- /chains/main/blocks/.*/helpers/endorsing_rights
- /helpers/baking_rights
- /helpers/endorsing_rights
- /chains/main/blocks/.*/context/contracts(/?)$
gc:
percent: 20
gzip:
enabled: false
host: 0.0.0.0:8080 # is used inside nginx config, tzproxy:8080
logger:
bunch_size: 1000
pool_interval_seconds: 10
metrics:
enabled: false
host: 0.0.0.0:9000
pprof: false
rate_limit:
enabled: false
max: 300
minutes: 1
tezos_host: teia-ui:8000 # references docker-compose.yml service name
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ services:
restart: unless-stopped
ports:
- 0.0.0.0:8080:80
# volumes:
# - ./.github/workflows/nginx.conf:/etc/nginx/conf.d/default.conf
# - ./.github/workflows/previews.lua:/lua/previews.lua
volumes:
- ./.github/workflows/nginx.conf:/etc/nginx/conf.d/default.conf
tzproxy:
image: ghcr.io/marigold-dev/tzproxy:latest-2f58f3c-1697469392
restart: unless-stopped
volumes:
- ./.github/workflows/tzproxy.yaml:/tzproxy.yaml

0 comments on commit 70777e9

Please sign in to comment.